aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxcb/src/xcb_util.c')
-rw-r--r--libxcb/src/xcb_util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c
index 55aadb7ca..97642c04d 100644
--- a/libxcb/src/xcb_util.c
+++ b/libxcb/src/xcb_util.c
@@ -249,6 +249,19 @@ static int _xcb_open_tcp(char *host, char *protocol, const unsigned short port)
}
#endif
+#ifdef WIN32
+ {
+ static WSADATA wsadata;
+
+ if (!wsadata.wVersion)
+ {
+ if (WSAStartup(0x0202, &wsadata))
+ return -1;
+ ptw32_processInitialize();
+ }
+ }
+#endif
+
snprintf(service, sizeof(service), "%hu", port);
if(getaddrinfo(host, service, &hints, &results))
/* FIXME: use gai_strerror, and fill in error connection */