aboutsummaryrefslogtreecommitdiff
path: root/libxcb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-18 14:01:19 +0000
committermarha <marha@users.sourceforge.net>2009-11-18 14:01:19 +0000
commiteae596341c64067cf46dbd2e5bc2e8db42fd0be1 (patch)
tree03c5e534d3e858c76b62cd5857337c7fd669abb7 /libxcb
parent44675ffa5e4590617f8c016ff36ccb3fb3cb4129 (diff)
downloadvcxsrv-eae596341c64067cf46dbd2e5bc2e8db42fd0be1.tar.gz
vcxsrv-eae596341c64067cf46dbd2e5bc2e8db42fd0be1.tar.bz2
vcxsrv-eae596341c64067cf46dbd2e5bc2e8db42fd0be1.zip
Used closesocket in stead of close for closing a socket on windows.
Diffstat (limited to 'libxcb')
-rw-r--r--libxcb/src/xcb_conn.c7
-rw-r--r--libxcb/src/xcb_util.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c
index 0b080d4d4..e3e4bdec9 100644
--- a/libxcb/src/xcb_conn.c
+++ b/libxcb/src/xcb_conn.c
@@ -58,6 +58,9 @@ typedef struct {
static const int error_connection = 1;
#ifdef _MSC_VER
+
+#define close(fd) closesocket(fd)
+
size_t writev(int fildes, const struct iovec *iov, int iovcnt)
{
int i, r;
@@ -287,11 +290,7 @@ void xcb_disconnect(xcb_connection_t *c)
return;
free(c->setup);
-#ifdef _MSC_VER
- closesocket(c->fd);
-#else
close(c->fd);
-#endif
pthread_mutex_destroy(&c->iolock);
_xcb_in_destroy(&c->in);
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c
index 97642c04d..1ab60b9e8 100644
--- a/libxcb/src/xcb_util.c
+++ b/libxcb/src/xcb_util.c
@@ -47,6 +47,10 @@
#include "xcbext.h"
#include "xcbint.h"
+#ifdef _MSC_VER
+#define close(fd) closesocket(fd)
+#endif
+
static const int error_connection = 1;
int xcb_popcount(uint32_t mask)