aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/xtrans/Xtranssock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/xtrans/Xtranssock.c')
-rw-r--r--nx-X11/lib/xtrans/Xtranssock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c
index 3e4896fce..cdc421a1e 100644
--- a/nx-X11/lib/xtrans/Xtranssock.c
+++ b/nx-X11/lib/xtrans/Xtranssock.c
@@ -141,6 +141,8 @@ from the copyright holders.
#include <sys/stropts.h>
#endif
+#include <unistd.h>
+
#else /* !WIN32 */
#include <nx-X11/Xwinsock.h>
@@ -993,7 +995,7 @@ TRANS(SocketOpen) (int i, int type)
Sockettrans2devtab[i].protocol)) < 0
#ifndef WIN32
#if (defined(X11_t) && !defined(USE_POLL)) || defined(FS_t) || defined(FONT_t)
- || ciptr->fd >= TRANS_OPEN_MAX
+ || ciptr->fd >= sysconf(_SC_OPEN_MAX)
#endif
#endif
) {