qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH] w32: Fix compilation of new code
Date: Thu, 31 Mar 2011 22:58:49 +0200	[thread overview]
Message-ID: <1301605129-12808-1-git-send-email-weil@mail.berlios.de> (raw)

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 <pbonzini@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 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 <sys/wait.h>
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);
-- 
1.7.2.5

             reply	other threads:[~2011-03-31 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 20:58 Stefan Weil [this message]
2011-04-01  7:04 ` [Qemu-devel] Re: [PATCH] w32: Fix compilation of new code Paolo Bonzini
2011-04-03  9:10 ` Blue Swirl
2011-04-03  9:41   ` Stefan Weil
2011-04-03 10:05     ` Blue Swirl
2011-04-08 19:49   ` Stefan Weil
2011-04-08 20:18     ` Blue Swirl

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=1301605129-12808-1-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@redhat.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).