aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/llnlxdir/files
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2012-03-11 03:40:22 +0800
committercy <cy@FreeBSD.org>2012-03-11 03:40:22 +0800
commit9190628926fe28126bd066d5427de14c9eab7af8 (patch)
tree1158f709ede159d0830be229dcfffad50122b1b9 /ftp/llnlxdir/files
parent8281d9d1f0a3216e1fdf1489dd37a8efefa36010 (diff)
downloadfreebsd-ports-gnome-9190628926fe28126bd066d5427de14c9eab7af8.tar.gz
freebsd-ports-gnome-9190628926fe28126bd066d5427de14c9eab7af8.tar.zst
freebsd-ports-gnome-9190628926fe28126bd066d5427de14c9eab7af8.zip
Fix issue with select().
Feature safe: yes
Diffstat (limited to 'ftp/llnlxdir/files')
-rw-r--r--ftp/llnlxdir/files/patch-local.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ftp/llnlxdir/files/patch-local.c b/ftp/llnlxdir/files/patch-local.c
new file mode 100644
index 000000000000..636fa064d3a2
--- /dev/null
+++ b/ftp/llnlxdir/files/patch-local.c
@@ -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
+