[Xcb] [PATCH 1/3] Fix WIN32 compilation after commit 163c47bdc0d32785d831e4c93fea9ab7e023446b

Jon TURNEY jon.turney at dronecode.org.uk
Thu Jan 5 12:57:52 PST 2012


WIN32 does not have arpa/inet.h, so do not try to include it unless _WIN32 is
not defined

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 src/xcb_auth.c |    2 +-
 src/xcb_util.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xcb_auth.c b/src/xcb_auth.c
index 859ab8a..21c26b8 100644
--- a/src/xcb_auth.c
+++ b/src/xcb_auth.c
@@ -30,7 +30,6 @@
 #include <sys/param.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <arpa/inet.h>
 
 #ifdef __INTERIX
 /* _don't_ ask. interix has INADDR_LOOPBACK in here. */
@@ -40,6 +39,7 @@
 #ifdef _WIN32
 #include "xcb_windefs.h"
 #else
+#include <arpa/inet.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <sys/un.h>
diff --git a/src/xcb_util.c b/src/xcb_util.c
index fcb11f0..62c51e1 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -34,11 +34,11 @@
 #include <stddef.h>
 #include <unistd.h>
 #include <string.h>
-#include <arpa/inet.h>
 
 #ifdef _WIN32
 #include "xcb_windefs.h"
 #else
+#include <arpa/inet.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <netinet/in.h>
-- 
1.7.5.1



More information about the Xcb mailing list