aboutsummaryrefslogtreecommitdiff
path: root/X11/xtrans/Xtrans.c
diff options
context:
space:
mode:
Diffstat (limited to 'X11/xtrans/Xtrans.c')
-rwxr-xr-x[-rw-r--r--]X11/xtrans/Xtrans.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/X11/xtrans/Xtrans.c b/X11/xtrans/Xtrans.c
index ae8ffad8e..30f099255 100644..100755
--- a/X11/xtrans/Xtrans.c
+++ b/X11/xtrans/Xtrans.c
@@ -48,12 +48,16 @@ from The Open Group.
*/
#include <ctype.h>
+#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYSTEMD_DAEMON
#include <systemd/sd-daemon.h>
#endif
+#ifdef _MSC_VER
+#include <X11\Xwinsock.h>
+#endif
/*
* The transport table contains a definition for every transport (protocol)
* family. All operations that can be made on the transport go through this
@@ -113,9 +117,10 @@ Xtransport_table Xtransports[] = {
{ &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX },
#endif /* __SCO__ || __UNIXWARE__ */
#endif /* LOCALCONN */
+ { NULL, 0}
};
-#define NUMTRANS (sizeof(Xtransports)/sizeof(Xtransport_table))
+#define NUMTRANS (sizeof(Xtransports)/sizeof(Xtransport_table)-1)
#ifdef WIN32
@@ -700,7 +705,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg)
#if defined(WIN32)
{
#ifdef WIN32
- u_long arg;
+ unsigned long arg;
#else
int arg;
#endif
@@ -928,7 +933,6 @@ TRANS(Writev) (XtransConnInfo ciptr, struct iovec *buf, int size)
return ciptr->transptr->Writev (ciptr, buf, size);
}
-#if XTRANS_SEND_FDS
int
TRANS(SendFd) (XtransConnInfo ciptr, int fd, int do_close)
{
@@ -940,7 +944,6 @@ TRANS(RecvFd) (XtransConnInfo ciptr)
{
return ciptr->transptr->RecvFd(ciptr);
}
-#endif
int
TRANS(Disconnect) (XtransConnInfo ciptr)