pkgsrc/x11/xview-lib/patches/patch-dv
abs c9c8f97e88 - Add PKG_DESTDIR_SUPPORT
- Depend on the latest version of xview-config
- Mark as LICENSE sun-openlook-license
- Bump pkgrevision
2009-12-10 20:35:56 +00:00

16 lines
658 B
Text

$NetBSD: patch-dv,v 1.2 2009/12/10 20:35:58 abs Exp $
--- lib/libxview/notify/ndet_fd.c.orig 1993-06-29 05:18:08.000000000 +0000
+++ lib/libxview/notify/ndet_fd.c
@@ -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