Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KGNJx-0006MC-Mt for qemu-devel@nongnu.org; Tue, 08 Jul 2008 20:14:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KGNJv-0006Ly-4Q for qemu-devel@nongnu.org; Tue, 08 Jul 2008 20:14:08 -0400 Received: from [199.232.76.173] (port=53008 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGNJv-0006Lv-05 for qemu-devel@nongnu.org; Tue, 08 Jul 2008 20:14:07 -0400 Received: from mail.gmx.net ([213.165.64.20]:36350) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KGNJu-0005Ib-T2 for qemu-devel@nongnu.org; Tue, 08 Jul 2008 20:14:07 -0400 Date: Wed, 9 Jul 2008 02:14:17 +0200 (CEST) From: Johannes Schindelin Subject: Re: [Qemu-devel] [PATCH] Fix compilation of nbd on Windows In-Reply-To: <4873BE75.3070603@codemonkey.ws> Message-ID: References: <20080704092849.5BC0.20F538E7@nsfocus.com> <20080704023451.GO7007@networkno.de> <20080704115101.5BC9.20F538E7@nsfocus.com> <1215160927.3802.4.camel@frecb07144> <20080704203231.GB31670@networkno.de> <4873BE75.3070603@codemonkey.ws> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Laurent Vivier , qemu-devel@nongnu.org, chenqing Hi, On Tue, 8 Jul 2008, Anthony Liguori wrote: > Johannes Schindelin wrote: > > This still only supports the client side, and only the TCP version of > > it, since Windows does not have Unix sockets. > > > > Signed-off-by: Johannes Schindelin > > --- > > > > This is only compile-tested, since I can only work in an emulated > > environment. > > > > Oh, and feel free to reorder nbd.h so that it has only one #ifndef..#endif. > > > > If I find some time next week, I might try to actually compile qemu-nbd and > > get it to run on Windows. > > > > Makefile | 1 + > > block-nbd.c | 11 ++++++++++- > > nbd.c | 36 +++++++++++++++++++++++++++++++++++- > > nbd.h | 6 ++++++ > > 4 files changed, 52 insertions(+), 2 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index adb36c6..ef55952 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -70,6 +70,7 @@ endif > > > > ifdef CONFIG_WIN32 > > OBJS+=tap-win32.o > > +LIBS+= -lws2_32 > > endif > > > > AUDIO_OBJS = audio.o noaudio.o wavaudio.o mixeng.o > > diff --git a/block-nbd.c b/block-nbd.c > > index f350050..a2adbde 100644 > > --- a/block-nbd.c > > +++ b/block-nbd.c > > @@ -31,11 +31,17 @@ > > > > #include > > #include > > +#ifdef _WIN32 > > +#include > > +#include > > +#include > > +#else > > #include > > #include > > #include > > #include > > #include > > +#endif > > > > qemu_socket.h already does this for you. Thanks! That was actually very useful advice! Note that I will likely have to do different things until later this week, but then I will definitely take this advice into account, and try to get qemu-nbd going (tcp-only) on Windows. Ciao, Dscho