openbsd-ports/x11/xview/config/patches/p-libxview-notify-ndet_fd_c
espie f3cbb56810 Xview's return.
Cleaned up so that lib depends on config:build, and lndir it
instead of mucking with the source dir.

All patches put into config/patches, separated and renamed
(yes, this is a LARGE fucker).

Fake

xview/clients to come.

Currently installs under /usr/X11R6, some more patches to X needed to fix
that.
2000-04-02 15:25:13 +00:00

15 lines
621 B
Plaintext

--- ./lib/libxview/notify/ndet_fd.c.orig Tue Jun 29 07:18:08 1993
+++ ./lib/libxview/notify/ndet_fd.c Sat Apr 1 18:25:39 2000
@@ -27,8 +27,9 @@ extern int dtablesize_cache;
#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