summaryrefslogtreecommitdiff
path: root/x11-toolkits/xview/files/patch-lib+libxview+notify+ndet_fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11-toolkits/xview/files/patch-lib+libxview+notify+ndet_fd.c')
-rw-r--r--x11-toolkits/xview/files/patch-lib+libxview+notify+ndet_fd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/x11-toolkits/xview/files/patch-lib+libxview+notify+ndet_fd.c b/x11-toolkits/xview/files/patch-lib+libxview+notify+ndet_fd.c
new file mode 100644
index 000000000000..c4588bb399f9
--- /dev/null
+++ b/x11-toolkits/xview/files/patch-lib+libxview+notify+ndet_fd.c
@@ -0,0 +1,14 @@
+--- ../alt/lib/libxview/notify/ndet_fd.c Tue Jun 29 07:18:08 1993
++++ lib/libxview/notify/ndet_fd.c Sat Jul 26 00:42:21 1997
+@@ -27,8 +27,9 @@
+ #define GETDTABLESIZE() \
+ (dtablesize_cache?dtablesize_cache:(dtablesize_cache=(int)sysconf(_SC_OPEN_MAX)))
+ #else
+-#define GETDTABLESIZE() \
+- (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
++#define GETDTABLESIZE() \
++ (dtablesize_cache ? dtablesize_cache : \
++ (dtablesize_cache = MIN(getdtablesize(), FD_SETSIZE)))
+ #endif SVR4
+
+ static int ndet_fd_table_size; /* Number of descriptor slots