qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Eduardo Felipe" <edusaper@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [4402] Special-case CTL_ALIAS instead of CTL_DNS in udp loopback test.
Date: Mon, 12 May 2008 19:58:13 +0200	[thread overview]
Message-ID: <83a4d4ca0805121058h642dc13m9e269a8e936418ce@mail.gmail.com> (raw)
In-Reply-To: <E1JueDi-0007V6-JD@cvs.savannah.gnu.org>

Hi,

This commit breaks compilation in win32. Fix attached:

--- slirp/slirp.h	Mon May 12 19:44:40 2008
+++ slirp/slirp.h	Mon May 12 19:44:05 2008
@@ -32,6 +32,7 @@
 #define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 # include <winsock2.h>
+# include <ws2tcpip.h>
 # include <sys/timeb.h>
 # include <iphlpapi.h>


Regards,
Edu

2008/5/10 Andrzej Zaborowski <balrogg@gmail.com>:
> Revision: 4402
>          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4402
> Author:   balrog
> Date:     2008-05-10 01:49:53 +0000 (Sat, 10 May 2008)
>
> Log Message:
> -----------
> Special-case CTL_ALIAS instead of CTL_DNS in udp loopback test.
>
> At the same time remove a bogus test (tested by Jason Wessel).
> Quiet some gcc4 warnings from slirp compilation.
>
> Modified Paths:
> --------------
>    trunk/slirp/if.c
>    trunk/slirp/misc.c
>    trunk/slirp/socket.c
>    trunk/slirp/udp.c
>
> Modified: trunk/slirp/if.c
> ===================================================================
> --- trunk/slirp/if.c    2008-05-09 22:17:18 UTC (rev 4401)
> +++ trunk/slirp/if.c    2008-05-10 01:49:53 UTC (rev 4402)
> @@ -291,7 +291,7 @@
>        }
>
>        /* Encapsulate the packet for sending */
> -        if_encap(ifm->m_data, ifm->m_len);
> +        if_encap((uint8_t *)ifm->m_data, ifm->m_len);
>
>         m_free(ifm);
>
>
> Modified: trunk/slirp/misc.c
> ===================================================================
> --- trunk/slirp/misc.c  2008-05-09 22:17:18 UTC (rev 4401)
> +++ trunk/slirp/misc.c  2008-05-10 01:49:53 UTC (rev 4402)
> @@ -304,7 +304,7 @@
>  {
>        int s;
>        struct sockaddr_in addr;
> -       int addrlen = sizeof(addr);
> +       socklen_t addrlen = sizeof(addr);
>        int opt;
>         int master = -1;
>        char *argv[256];
>
> Modified: trunk/slirp/socket.c
> ===================================================================
> --- trunk/slirp/socket.c        2008-05-09 22:17:18 UTC (rev 4401)
> +++ trunk/slirp/socket.c        2008-05-10 01:49:53 UTC (rev 4402)
> @@ -392,7 +392,7 @@
>        struct socket *so;
>  {
>        struct sockaddr_in addr;
> -       int addrlen = sizeof(struct sockaddr_in);
> +       socklen_t addrlen = sizeof(struct sockaddr_in);
>
>        DEBUG_CALL("sorecvfrom");
>        DEBUG_ARG("so = %lx", (long)so);
> @@ -545,7 +545,8 @@
>  {
>        struct sockaddr_in addr;
>        struct socket *so;
> -       int s, addrlen = sizeof(addr), opt = 1;
> +       int s, opt = 1;
> +       socklen_t addrlen = sizeof(addr);
>
>        DEBUG_CALL("solisten");
>        DEBUG_ARG("port = %d", port);
>
> Modified: trunk/slirp/udp.c
> ===================================================================
> --- trunk/slirp/udp.c   2008-05-09 22:17:18 UTC (rev 4401)
> +++ trunk/slirp/udp.c   2008-05-10 01:49:53 UTC (rev 4402)
> @@ -322,7 +322,7 @@
>         if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff))
>             saddr.sin_addr.s_addr = alias_addr.s_addr;
>         else if (addr->sin_addr.s_addr == loopback_addr.s_addr ||
> -                 ((so->so_faddr.s_addr & htonl(CTL_DNS)) == htonl(CTL_DNS)))
> +                 (ntohl(so->so_faddr.s_addr) & 0xff) != CTL_ALIAS)
>             saddr.sin_addr.s_addr = so->so_faddr.s_addr;
>     }
>     daddr.sin_addr = so->so_laddr;
> @@ -410,7 +410,7 @@
>  udp_emu(struct socket *so, struct mbuf *m)
>  {
>        struct sockaddr_in addr;
> -        int addrlen = sizeof(addr);
> +       socklen_t addrlen = sizeof(addr);
>  #ifdef EMULATE_TALK
>        CTL_MSG_OLD *omsg;
>        CTL_MSG *nmsg;
> @@ -641,7 +641,7 @@
>  {
>        struct sockaddr_in addr;
>        struct socket *so;
> -       int addrlen = sizeof(struct sockaddr_in), opt = 1;
> +       socklen_t addrlen = sizeof(struct sockaddr_in), opt = 1;
>
>        if ((so = socreate()) == NULL) {
>                free(so);
>
>
>
>
>

      reply	other threads:[~2008-05-12 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-10  1:49 [Qemu-devel] [4402] Special-case CTL_ALIAS instead of CTL_DNS in udp loopback test Andrzej Zaborowski
2008-05-12 17:58 ` Eduardo Felipe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a4d4ca0805121058h642dc13m9e269a8e936418ce@mail.gmail.com \
    --to=edusaper@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).