From 973b510e954f6989ed773f8b357ca50fbc99bced Mon Sep 17 00:00:00 2001 From: Daniel G Date: Sat, 7 Jan 2023 19:35:47 +0000 Subject: Fix windows build. --- src/xcb_util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3