15 lines
639 B
Plaintext
15 lines
639 B
Plaintext
--- lib/libxview/notify/ndet_fd.c.orig 1993-06-29 07:18:08.000000000 +0200
|
|
+++ lib/libxview/notify/ndet_fd.c 2003-12-30 01:31:12.000000000 +0100
|
|
@@ -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
|