From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JvcHz-0002fe-Fg for qemu-devel@nongnu.org; Mon, 12 May 2008 13:58:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JvcHw-0002d7-TL for qemu-devel@nongnu.org; Mon, 12 May 2008 13:58:18 -0400 Received: from [199.232.76.173] (port=56824 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvcHw-0002cq-N2 for qemu-devel@nongnu.org; Mon, 12 May 2008 13:58:16 -0400 Received: from py-out-1112.google.com ([64.233.166.176]:28004) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JvcHw-00076B-C8 for qemu-devel@nongnu.org; Mon, 12 May 2008 13:58:16 -0400 Received: by py-out-1112.google.com with SMTP id u52so2583747pyb.10 for ; Mon, 12 May 2008 10:58:14 -0700 (PDT) Message-ID: <83a4d4ca0805121058h642dc13m9e269a8e936418ce@mail.gmail.com> Date: Mon, 12 May 2008 19:58:13 +0200 From: "Eduardo Felipe" Subject: Re: [Qemu-devel] [4402] Special-case CTL_ALIAS instead of CTL_DNS in udp loopback test. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.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 # include +# include # include # include Regards, Edu 2008/5/10 Andrzej Zaborowski : > 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); > > > > >