Fix issue with select().

Feature safe:	yes
This commit is contained in:
Cy Schubert 2012-03-10 19:40:22 +00:00
parent 9a33fe0ea6
commit 4c5ca49bf1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=293058
2 changed files with 19 additions and 1 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= llnlxdir
PORTVERSION= 2.1.2
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= ftp
MASTER_SITES= https://computing.llnl.gov/resources/xdir/
DISTNAME= llnlxdir2_1_2

View file

@ -0,0 +1,18 @@
--- local.c.orig 1999-11-22 16:07:32.000000000 -0800
+++ local.c 2012-03-10 11:13:59.817174472 -0800
@@ -193,11 +193,14 @@
#ifdef _SC_OPEN_MAX /* POSIX */
if ((max_files = sysconf(_SC_OPEN_MAX)) == -1)
fatal_error("Trouble in max_fds() - sysconf() failed");
+ if (max_files > 1024)
+ max_files=1024;
#else
#ifdef _NFILE /* Might be overkill */
max_files = _NFILE;
#else /* Assume BSD */
- max_files = getdtablesize();
+ if ((max_files = getdtablesize()) > 1024)
+ max_files=1024;
#endif
#endif