diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-07-17 08:31:11 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-07-17 08:31:11 +0000 |
commit | 6cccfd93d90df41c275b06d3e5a40658b661566c (patch) | |
tree | 1aab3c632b04c7332392b5c1273406ac2b049e60 /dist/libxcb/src/xcb_util.c | |
parent | c36abfebd4d7981796005f812b8f35bf745e1d64 (diff) |
Update libxcb to version 1.15 + xcb-protos 1.15.2
Diffstat (limited to 'dist/libxcb/src/xcb_util.c')
-rw-r--r-- | dist/libxcb/src/xcb_util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dist/libxcb/src/xcb_util.c b/dist/libxcb/src/xcb_util.c index a16270c63..0296ce0dd 100644 --- a/dist/libxcb/src/xcb_util.c +++ b/dist/libxcb/src/xcb_util.c @@ -36,12 +36,12 @@ #include <stdio.h> #include <stdlib.h> #include <stddef.h> -#include <unistd.h> #include <string.h> #ifdef _WIN32 #include "xcb_windefs.h" #else +#include <unistd.h> #include <arpa/inet.h> #include <sys/socket.h> #include <sys/un.h> @@ -415,7 +415,11 @@ static int _xcb_open_tcp(const char *host, char *protocol, const unsigned short if(_xcb_do_connect(fd, (struct sockaddr*)&_s, sizeof(_s)) >= 0) break; +#ifdef _WIN32 + closesocket(fd); +#else close(fd); +#endif fd = -1; ++_c; } |