diff options
author | Peter Harris <pharris@opentext.com> | 2021-02-01 17:43:52 -0500 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2021-06-04 14:31:13 +0000 |
commit | 4b0d9d3868aad8d5f4266821e9eda586e6c2bfa7 (patch) | |
tree | d31a073fa5d036d5ec404b539fac44cbc5be18d3 /src/xcb_out.c | |
parent | cd0fba98a2d0867d505ff1a7ca8d7a7c757acfa2 (diff) |
Fix build on Windows
Notable changes: Protect include of unistd.h (and other POSIX headers).
Use SOCKET (which is larger than int) and closesocket (because close is
not compatible) for sockets. Use <stdint.h>'s intptr_t instead of the
non-portable ssize_t.
Signed-off-by: Peter Harris <pharris@opentext.com>
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r-- | src/xcb_out.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c index c9593e5..df94867 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -31,7 +31,11 @@ #include <assert.h> #include <stdlib.h> +#ifdef _WIN32 +#include <io.h> +#else #include <unistd.h> +#endif #include <string.h> #include "xcb.h" |