summaryrefslogtreecommitdiff
path: root/chat/ircu/patches/patch-ah
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2006-12-21 16:13:53 +0000
committerjmmv <jmmv@pkgsrc.org>2006-12-21 16:13:53 +0000
commitd7987367999da4693bd69a16b38228774fe1164f (patch)
treebec9c09bad8a827d0dd26efe9c48b07d08c25e7e /chat/ircu/patches/patch-ah
parent6da4cecc54126378e625d706899c1e1442eb4cd7 (diff)
downloadpkgsrc-d7987367999da4693bd69a16b38228774fe1164f.tar.gz
Fix build under Mac OS X.
Diffstat (limited to 'chat/ircu/patches/patch-ah')
-rw-r--r--chat/ircu/patches/patch-ah50
1 files changed, 48 insertions, 2 deletions
diff --git a/chat/ircu/patches/patch-ah b/chat/ircu/patches/patch-ah
index c5e1f70432c..0126d04c06c 100644
--- a/chat/ircu/patches/patch-ah
+++ b/chat/ircu/patches/patch-ah
@@ -1,6 +1,6 @@
-$NetBSD: patch-ah,v 1.3 2005/12/13 18:14:10 joerg Exp $
+$NetBSD: patch-ah,v 1.4 2006/12/21 16:13:54 jmmv Exp $
---- configure.orig 2004-09-18 02:17:45.000000000 +0000
+--- configure.orig 2004-09-18 04:17:45.000000000 +0200
+++ configure
@@ -2370,7 +2370,6 @@ if test x"$CFLAGS" != x; then
fi
@@ -19,3 +19,49 @@ $NetBSD: patch-ah,v 1.3 2005/12/13 18:14:10 joerg Exp $
echo "$as_me:$LINENO: result: Generic BSD ($host) found." >&5
echo "${ECHO_T}Generic BSD ($host) found." >&6
if test x"$ac_cv_header_poll_h" = xyes; then
+@@ -7968,9 +7967,25 @@ cat >>confdefs.h <<_ACEOF
+ _ACEOF
+
+
+-unet_maxcon=`ulimit -Hn`
+-if test x"$unet_maxcon" = xunlimited; then
+- unet_maxcon=`ulimit -Sn`
++if test x$unet_poll_syscall = xno; then
++ # Avoid usage of ulimit. pkgsrc removes some limits at run time and
++ # that raises the values too much in some cases to confuse the code in
++ # s_bsd.c (seen in Mac OS X 10.4). Better use FD_SETSIZE as that is
++ # the maximum value the code will be able to handle when using the
++ # select(2) system call.
++ cat >./conftest.c <<_ACEOF
++#include <sys/select.h>
++#include <stdio.h>
++int main(void) { printf("%d\n", FD_SETSIZE); return 0; }
++_ACEOF
++ cc -o ./conftest ./conftest.c
++ unet_maxcon=`./conftest`
++ rm ./conftest ./conftest.c
++else
++ unet_maxcon=`ulimit -Hn`
++ if test x"$unet_maxcon" = xunlimited; then
++ unet_maxcon=`ulimit -Sn`
++ fi
+ fi
+ unet_maxcon=`expr $unet_maxcon - 4`
+ echo "$as_me:$LINENO: checking max connections" >&5
+@@ -8002,7 +8017,7 @@ cat >>confdefs.h <<_ACEOF
+ _ACEOF
+
+
+- ac_config_files="$ac_config_files Makefile ircd/Makefile doc/Makefile"
++ ac_config_files="$ac_config_files Makefile ircd/Makefile doc/Makefile tools/Makefile.crypt"
+ ac_config_commands="$ac_config_commands default"
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -8534,6 +8549,7 @@ do
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "ircd/Makefile" ) CONFIG_FILES="$CONFIG_FILES ircd/Makefile" ;;
+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
++ "tools/Makefile.crypt" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile.crypt" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5