qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] Fix compilation of nbd on Windows


From: Johannes Schindelin
Subject: Re: [Qemu-devel] [PATCH v2] Fix compilation of nbd on Windows
Date: Sun, 3 Aug 2008 19:32:24 +0200 (CEST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Hi,

[was it intentional that you culled me, and me alone, from the Cc: list? 
 I know that you like to be rude against me, but I'd like to know if it 
 was really meant this way this time.]

On Sun, 3 Aug 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.
> >   
> 
> This patch fixes the build of qemu-nbd but breaks the build of qemu for 
> win32.

The build did not break here.

But then, I do not have a Windows computer myself, so I could not really 
test QEmu itself.

> > +static inline int inet_aton(const char *cp, struct in_addr *inp)
> > +{
> > +   unsigned long result = inet_addr(cp);
> > +   if (result == INADDR_NONE)
> > +           return 0;
> > +   inp->s_addr = result;
> > +   return 1;
> > +}
> >   
> 
> This bit conflicts with:
> 
> > #include <winsock2.h>
> > int inet_aton(const char *cp, struct in_addr *ia);
> > #endif
> 
> This definition in vl.c

It is not the definition, but just the declaration.  And by your own 
reasoning, it should not be in vl.c but in qemu_socket.h, where I would 
have picked up on it and spared myself writing my own implementation of 
inet_aton().

Indeed, it seems that inet_aton() is defined in slirp/misc.c.  So 
qemu_socket.h is not even the right place for the definition, but better 
than nothing.

Ciao,
Dscho





reply via email to

[Prev in Thread] Current Thread [Next in Thread]