[34963] trunk/dports/net/squid
jmr at macports.org
jmr at macports.org
Wed Mar 12 23:30:00 PDT 2008
Revision: 34963
http://trac.macosforge.org/projects/macports/changeset/34963
Author: jmr at macports.org
Date: 2008-03-12 23:29:59 -0700 (Wed, 12 Mar 2008)
Log Message:
-----------
squid: fix detection of max open files on Leopard. Closes #14076.
Modified Paths:
--------------
trunk/dports/net/squid/Portfile
Added Paths:
-----------
trunk/dports/net/squid/files/patch-configure.diff
Modified: trunk/dports/net/squid/Portfile
===================================================================
--- trunk/dports/net/squid/Portfile 2008-03-13 05:52:25 UTC (rev 34962)
+++ trunk/dports/net/squid/Portfile 2008-03-13 06:29:59 UTC (rev 34963)
@@ -4,6 +4,7 @@
name squid
version 2.6.STABLE18
+revision 1
categories net
platforms darwin
maintainers mww
@@ -33,6 +34,10 @@
depends_lib port:openssl port:zlib
+platform darwin 9 {
+ patchfiles-append patch-configure.diff
+}
+
configure.args --with-pthreads \
--mandir=${prefix}/share/man \
--sysconfdir=${prefix}/etc/squid \
Added: trunk/dports/net/squid/files/patch-configure.diff
===================================================================
--- trunk/dports/net/squid/files/patch-configure.diff (rev 0)
+++ trunk/dports/net/squid/files/patch-configure.diff 2008-03-13 06:29:59 UTC (rev 34963)
@@ -0,0 +1,15 @@
+--- configure.orig 2008-01-10 23:34:23.000000000 +1100
++++ configure 2008-01-26 15:32:17.000000000 +1100
+@@ -25837,7 +25837,12 @@
+ if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
+ perror("getrlimit: RLIMIT_NOFILE");
+ } else {
++#if defined(__APPLE__)
++ /* asking for more than OPEN_MAX fails on Leopard */
++ rl.rlim_cur = (OPEN_MAX < rl.rlim_max ? OPEN_MAX : rl.rlim_max);
++#else
+ rl.rlim_cur = rl.rlim_max; /* set it to the max */
++#endif
+ if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
+ perror("setrlimit: RLIMIT_NOFILE");
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080312/264cc78e/attachment.html
More information about the macports-changes
mailing list