X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_util.c;h=9329b81dd4fb204fa5827d9acd2ecf7f4784541a;hb=31b57676e8d7ab6048dbfb145187833fac5e478c;hp=64a1f6d63b3a8e00f33202ac5bd05cb7ad761661;hpb=0e9246def562be97cc816f824f702233a826ec56;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_util.c b/src/xcb_util.c index 64a1f6d..9329b81 100644 --- a/src/xcb_util.c +++ b/src/xcb_util.c @@ -426,11 +426,22 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname, if(!parsed) { c = _xcb_conn_ret_error(XCB_CONN_CLOSED_PARSE_ERR); goto out; - } else + } else { +#ifdef _WIN32 + WSADATA wsaData; + if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { + c = (xcb_connection_t *) &error_connection; + goto out; + } +#endif fd = _xcb_open(host, protocol, display); + } if(fd == -1) { c = _xcb_conn_ret_error(XCB_CONN_ERROR); +#ifdef _WIN32 + WSACleanup(); +#endif goto out; }