pkgsrc/net/tsocks/patches/patch-ab
joerg e09d0a31a7 Include <sys/types.h> before <sys/socket.h> for DragonFly.
Detect poll correctly on DragonFly.
2006-03-23 16:37:46 +00:00

83 lines
2.3 KiB
Text

$NetBSD: patch-ab,v 1.4 2006/03/23 16:37:46 joerg Exp $
--- configure.orig 2002-07-15 22:51:08.000000000 +0000
+++ configure
@@ -538,7 +538,6 @@ fi
-test "$libdir" = "\${exec_prefix}/lib" && libdir="/lib"
# Check whether --enable-socksdns or --disable-socksdns was given.
if test "${enable_socksdns+set}" = set; then
@@ -1375,7 +1374,7 @@ fi
done
-for ac_func in strcspn strdup strerror strspn strtol
+for ac_func in strcspn strdup strerror strspn strtol dlopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1382: checking for $ac_func" >&5
@@ -1426,9 +1425,11 @@ if eval "test \"`echo '$ac_cv_func_'$ac_
EOF
else
+if [ ${ac_func} != "dlopen" ]; then
echo "$ac_t""no" 1>&6
{ echo "configure: error: "Required function not found"" 1>&2; exit 1; }
fi
+fi
done
@@ -1836,6 +1837,7 @@ fi
SIMPLELIBS=${LIBS}
LIBS=
+if [ $ac_cv_func_dlopen != "yes" ]; then
echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
echo "configure:1841: checking for dlsym in -ldl" >&5
ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
@@ -1883,6 +1885,7 @@ else
echo "$ac_t""no" 1>&6
{ echo "configure: error: "libdl is required"" 1>&2; exit 1; }
fi
+fi
echo $ac_n "checking "for RTLD_NEXT from dlfcn.h"""... $ac_c" 1>&6
@@ -2078,12 +2081,16 @@ EOF
echo $ac_n "checking "location of libc.so"""... $ac_c" 1>&6
echo "configure:2081: checking "location of libc.so"" >&5
+ if test "$OPSYS" != "IRIX"; then
LIBC=
for DIR in '/lib' '/usr/lib'; do
if test "${LIBC}" = ""; then
LIBC=`$FIND $DIR -name "libc.so.?" 2>/dev/null | $TAIL -1`
fi
done
+ else
+ LIBC=/usr/lib$ABI/libc.so
+ fi
cat >> confdefs.h <<EOF
#define LIBC "${LIBC}"
@@ -2151,6 +2158,7 @@ do
#line 2152 "configure"
#include "confdefs.h"
+ #include <sys/types.h>
#include <sys/socket.h>
int connect($testproto);
@@ -2228,7 +2236,7 @@ EOF
echo $ac_n "checking for correct poll prototype""... $ac_c" 1>&6
echo "configure:2230: checking for correct poll prototype" >&5
PROTO=
-for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout'
+for testproto in 'struct pollfd *ufds, nfds_t nfds, int timeout' 'struct pollfd *ufds, unsigned int nfds, int timeout'
do
if test "${PROTO}" = ""; then
cat > conftest.$ac_ext <<EOF