diff options
Diffstat (limited to 'libxcb/src/xcb_util.c')
-rw-r--r-- | libxcb/src/xcb_util.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c index 55aadb7ca..577ec3da9 100644 --- a/libxcb/src/xcb_util.c +++ b/libxcb/src/xcb_util.c @@ -26,6 +26,10 @@ /* Utility functions implementable using only public APIs. */ #include <assert.h> +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#ifndef _MSC_VER #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> @@ -36,17 +40,31 @@ #include <netdnet/dn.h> #endif #include <netdb.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> #include <stddef.h> #include <unistd.h> + +#else +#include <X11/Xwinsock.h> +#include <X11\Xos.h> +#define snprintf _snprintf +#define HAVE_GETADDRINFO +#endif + #include <string.h> #include "xcb.h" #include "xcbext.h" #include "xcbint.h" +#ifndef HAVE_GETADDRINFO +#include "dummyin6.h" +#include "getaddrinfo.h" +#else +#ifdef _MSC_VER +#include <Ws2tcpip.h> +#endif +#endif + static const int error_connection = 1; int xcb_popcount(uint32_t mask) |