|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH v2] Fix compilation of nbd on Windows |
Date: | Sun, 03 Aug 2008 12:11:40 -0500 |
User-agent: | Thunderbird 2.0.0.14 (X11/20080501) |
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.
Signed-off-by: Johannes Schindelin <address@hidden> --- diff --git a/qemu_socket.h b/qemu_socket.h index 5229c24..73e05d8 100644 --- a/qemu_socket.h +++ b/qemu_socket.h @@ -10,9 +10,27 @@#define socket_error() WSAGetLastError()#undef EINTR +#undef EINVAL #define EWOULDBLOCK WSAEWOULDBLOCK #define EINTR WSAEINTR #define EINPROGRESS WSAEINPROGRESS +#define EINVAL WSAEINVAL + +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 Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |