From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5YPk-0007Y7-RD for qemu-devel@nongnu.org; Fri, 01 Apr 2011 03:05:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5YPj-000180-Kv for qemu-devel@nongnu.org; Fri, 01 Apr 2011 03:05:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5YPj-00017I-4K for qemu-devel@nongnu.org; Fri, 01 Apr 2011 03:04:59 -0400 Message-ID: <4D95790F.7030604@redhat.com> Date: Fri, 01 Apr 2011 09:04:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1301605129-12808-1-git-send-email-weil@mail.berlios.de> In-Reply-To: <1301605129-12808-1-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] w32: Fix compilation of new code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Blue Swirl , Anthony Liguori , QEMU Developers On 03/31/2011 10:58 PM, Stefan Weil wrote: > Some recently added new code did not compile for w32 targets. > > The functions qemu_iohandler_fill and qemu_iohandler_poll need > data type fd_set which is declared in winsock2.h for w32 targets. > > Moving the functions from qemu-common.h to qemu_socket.h fixes > compilations for w32 without adding a new include file to qemu-common.h. > > Cc: Paolo Bonzini > Cc: Anthony Liguori > Signed-off-by: Stefan Weil > --- > iohandler.c | 1 + > qemu-common.h | 3 --- > qemu_socket.h | 4 ++++ > 3 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/iohandler.c b/iohandler.c > index 2b82421..bf1ba5c 100644 > --- a/iohandler.c > +++ b/iohandler.c > @@ -26,6 +26,7 @@ > #include "qemu-common.h" > #include "qemu-char.h" > #include "qemu-queue.h" > +#include "qemu_socket.h" > > #ifndef _WIN32 > #include > diff --git a/qemu-common.h b/qemu-common.h > index 8ecb488..eb2c96a 100644 > --- a/qemu-common.h > +++ b/qemu-common.h > @@ -228,9 +228,6 @@ typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size); > typedef int IOCanReadHandler(void *opaque); > typedef void IOHandler(void *opaque); > > -void qemu_iohandler_fill(int *pnfds, fd_set *readfds, fd_set *writefds, fd_set *xfds); > -void qemu_iohandler_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, int rc); > - > struct ParallelIOArg { > void *buffer; > int count; > diff --git a/qemu_socket.h b/qemu_socket.h > index 180e4db..4a6ef82 100644 > --- a/qemu_socket.h > +++ b/qemu_socket.h > @@ -32,6 +32,10 @@ int inet_aton(const char *cp, struct in_addr *ia); > > #include "qemu-option.h" > > +/* Functions from iohandler.c. */ > +void qemu_iohandler_fill(int *pnfds, fd_set *readfds, fd_set *writefds, fd_set *xfds); > +void qemu_iohandler_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, int rc); > + > /* misc helpers */ > int qemu_socket(int domain, int type, int protocol); > int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen); Acked-by: Paolo Bonzini Paolo