aboutsummaryrefslogtreecommitdiff
path: root/ftp/llnlxftp
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2012-03-10 19:39:02 +0000
committerCy Schubert <cy@FreeBSD.org>2012-03-10 19:39:02 +0000
commit9a33fe0ea6cdc1162d4ad2992cfe821be5855137 (patch)
treeda15fa88eec6a70de2e7bc333abae150a5309abd /ftp/llnlxftp
parenta4cc9fb493953e556e8aa581467a8f0033dd59a5 (diff)
downloadports-9a33fe0ea6cdc1162d4ad2992cfe821be5855137.tar.gz
ports-9a33fe0ea6cdc1162d4ad2992cfe821be5855137.zip
Fix select() issue.
Feature safe: yes
Notes
Notes: svn path=/head/; revision=293057
Diffstat (limited to 'ftp/llnlxftp')
-rw-r--r--ftp/llnlxftp/Makefile2
-rw-r--r--ftp/llnlxftp/files/patch-local.c18
2 files changed, 19 insertions, 1 deletions
diff --git a/ftp/llnlxftp/Makefile b/ftp/llnlxftp/Makefile
index 99af72fac657..07b7d6474cf7 100644
--- a/ftp/llnlxftp/Makefile
+++ b/ftp/llnlxftp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= llnlxftp
PORTVERSION= 2.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= ftp
MASTER_SITES= https://computing.llnl.gov/resources/xdir/
DISTNAME= llnlxftp2.1
diff --git a/ftp/llnlxftp/files/patch-local.c b/ftp/llnlxftp/files/patch-local.c
new file mode 100644
index 000000000000..896db7ca85c3
--- /dev/null
+++ b/ftp/llnlxftp/files/patch-local.c
@@ -0,0 +1,18 @@
+--- local.c.orig 1995-10-19 08:20:22.000000000 -0700
++++ local.c 2012-03-10 11:24:10.000000000 -0800
+@@ -201,11 +201,15 @@
+ #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
+