summaryrefslogtreecommitdiff
path: root/net/tsocks/files/patch-configure
blob: 275f2c312df2d9a5f7606839da6bcf1f71e8960c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- configure.orig	Mon Jul 15 15:51:08 2002
+++ configure	Wed Oct  8 01:42:17 2003
@@ -1836,14 +1836,14 @@
 SIMPLELIBS=${LIBS}
 LIBS=
 
-echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
-echo "configure:1841: checking for dlsym in -ldl" >&5
+echo $ac_n "checking for dlsym in -lc""... $ac_c" 1>&6
+echo "configure:1841: checking for dlsym in -lc" >&5
 ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
+LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 1849 "configure"
 #include "confdefs.h"
@@ -1877,7 +1877,7 @@
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-ldl $LIBS"
+  LIBS="-lc $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
@@ -2151,6 +2151,7 @@
 #line 2152 "configure"
 #include "confdefs.h"
 
+      #include <sys/types.h>
       #include <sys/socket.h>
       int connect($testproto);
     
@@ -2227,14 +2228,16 @@
 
 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' 
+PROTO1="struct pollfd fds[], nfds_t nfds, int timeout"
+PROTO2="struct pollfd *fds, unsigned int nfds, int timeout"
+for PROTO in "$PROTO1" "$PROTO2"
 do
   if test "${PROTO}" = ""; then
     cat > conftest.$ac_ext <<EOF
 #line 2236 "configure"
 #include "confdefs.h"
 
+      #include <sys/types.h>
       #include <sys/poll.h>
       int poll($testproto);