aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-19 20:41:12 +0000
committermarha <marha@users.sourceforge.net>2009-10-19 20:41:12 +0000
commit07d4e6e86e3167bed18d2af81a56f3d9352d2541 (patch)
treeed035214dc260315faa0db3b11c26969f71a0d48 /libxcb/src
parent814b98c7e9cde9c8e97b476e6d409bc2607d846c (diff)
downloadvcxsrv-07d4e6e86e3167bed18d2af81a56f3d9352d2541.tar.gz
vcxsrv-07d4e6e86e3167bed18d2af81a56f3d9352d2541.tar.bz2
vcxsrv-07d4e6e86e3167bed18d2af81a56f3d9352d2541.zip
Make sure the winsock library and pthread library are initialised.
Diffstat (limited to 'libxcb/src')
-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 */