aboutsummaryrefslogtreecommitdiff
path: root/X11/xtrans/Xtranssock.c
diff options
context:
space:
mode:
Diffstat (limited to 'X11/xtrans/Xtranssock.c')
-rw-r--r--X11/xtrans/Xtranssock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/X11/xtrans/Xtranssock.c b/X11/xtrans/Xtranssock.c
index 3d45c2bfb..6fc9479f5 100644
--- a/X11/xtrans/Xtranssock.c
+++ b/X11/xtrans/Xtranssock.c
@@ -108,11 +108,15 @@ from the copyright holders.
#include <X11/Xw32defs.h>
#undef close
#define close closesocket
+#undef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED
+#undef EADDRINUSE
#define EADDRINUSE WSAEADDRINUSE
+#undef EPROTOTYPE
#define EPROTOTYPE WSAEPROTOTYPE
#undef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
+#undef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS
#undef EINTR
#define EINTR WSAEINTR
@@ -221,7 +225,11 @@ static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
#endif
#if defined HAVE_SOCKLEN_T || (defined(IPv6) && defined(AF_INET6))
+#ifdef _MSC_VER
+# define SOCKLEN_T int
+#else
# define SOCKLEN_T socklen_t
+#endif
#elif defined(SVR4) || defined(__SVR4) || defined(__SCO__)
# define SOCKLEN_T size_t
#else