summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel G <giri@nwrk.biz>2023-01-07 19:35:47 +0000
committerDaniel G <giri@nwrk.biz>2023-01-07 19:35:47 +0000
commit973b510e954f6989ed773f8b357ca50fbc99bced (patch)
tree1e1df53836e0ec6b8c024d75fc6d595b3cfd6cb7
parentcb8c70f5a65b4bd68b449dcaa637c3c4753e2f81 (diff)
Fix windows build.
-rw-r--r--src/xcb_util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xcb_util.c b/src/xcb_util.c
index 0296ce0..edda641 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -389,7 +389,11 @@ static int _xcb_open_tcp(const char *host, char *protocol, const unsigned short
fd = _xcb_socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
if (_xcb_do_connect(fd, addr->ai_addr, addr->ai_addrlen) >= 0)
break;
- close(fd);
+#ifdef _WIN32
+ closesocket(fd);
+#else
+ close(fd);
+#endif
fd = -1;
}
freeaddrinfo(results);