]> git.sesse.net Git - betaftpd/commitdiff
Included <linux/tcp.h> (if needed), for libc5 users.
authorsgunderson <sgunderson>
Fri, 15 Sep 2000 19:56:24 +0000 (19:56 +0000)
committersgunderson <sgunderson>
Fri, 15 Sep 2000 19:56:24 +0000 (19:56 +0000)
configure
configure.in
ftpd.c

index ab01c51dfeff298644498903f01922873148ae20..a7dd76864498cd4101d005cd938435b2bbfe5bf9 100755 (executable)
--- a/configure
+++ b/configure
@@ -2335,6 +2335,39 @@ else
 fi
 rm -f conftest*
 fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+       ac_safe=`echo "linux/tcp.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for linux/tcp.h""... $ac_c" 1>&6
+echo "configure:2348: checking for linux/tcp.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2353 "configure"
+#include "confdefs.h"
+#include <linux/tcp.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
@@ -2348,17 +2381,17 @@ for ac_hdr in sys/poll.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2352: checking for $ac_hdr" >&5
+echo "configure:2385: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2357 "configure"
+#line 2390 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2386,9 +2419,9 @@ done
 
 
 echo $ac_n "checking for poll()""... $ac_c" 1>&6
-echo "configure:2390: checking for poll()" >&5
+echo "configure:2423: checking for poll()" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2392 "configure"
+#line 2425 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_POLL_H
@@ -2405,7 +2438,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   enableval=yes
 else
@@ -2428,17 +2461,17 @@ for ac_hdr in sys/sendfile.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2432: checking for $ac_hdr" >&5
+echo "configure:2465: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2437 "configure"
+#line 2470 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2468,9 +2501,9 @@ done
 
 if test "$result" = "yes"; then
        echo $ac_n "checking for Linux sendfile()""... $ac_c" 1>&6
-echo "configure:2472: checking for Linux sendfile()" >&5
+echo "configure:2505: checking for Linux sendfile()" >&5
        cat > conftest.$ac_ext <<EOF
-#line 2474 "configure"
+#line 2507 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_SOCKET_H
@@ -2511,7 +2544,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   enableval=yes
 else
@@ -2525,13 +2558,13 @@ rm -f conftest*
 
        if test "$enableval" = "yes"; then
                                                                                echo $ac_n "checking that sendfile() really is implemented""... $ac_c" 1>&6
-echo "configure:2529: checking that sendfile() really is implemented" >&5
+echo "configure:2562: checking that sendfile() really is implemented" >&5
 
                if test "$cross_compiling" = yes; then
   enableval="cross-compiling, not checked"
 else
   cat > conftest.$ac_ext <<EOF
-#line 2535 "configure"
+#line 2568 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_SOCKET_H
@@ -2575,7 +2608,7 @@ int main() {
                return 1;
 }
 EOF
-if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   enableval=no
 else
@@ -2608,24 +2641,24 @@ EOF
                        has_sendfile=disabled
                fi
                echo $ac_n "checking final status of Linux sendfile() support""... $ac_c" 1>&6
-echo "configure:2612: checking final status of Linux sendfile() support" >&5
+echo "configure:2645: checking final status of Linux sendfile() support" >&5
                echo "$ac_t""$has_sendfile" 1>&6
        fi
 fi
 
 ac_safe=`echo "sys/uio.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/uio.h""... $ac_c" 1>&6
-echo "configure:2619: checking for sys/uio.h" >&5
+echo "configure:2652: checking for sys/uio.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2624 "configure"
+#line 2657 "configure"
 #include "confdefs.h"
 #include <sys/uio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2649,9 +2682,9 @@ fi
 
 if test "$result" = "yes"; then
        echo $ac_n "checking for BSD sendfile()""... $ac_c" 1>&6
-echo "configure:2653: checking for BSD sendfile()" >&5
+echo "configure:2686: checking for BSD sendfile()" >&5
        cat > conftest.$ac_ext <<EOF
-#line 2655 "configure"
+#line 2688 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_LIMITS_H
@@ -2692,7 +2725,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   enableval=yes
 else
index 10286bb8c8792e54a96830401ef61d521d307fd3..c912e34f7b50623c134040332d99a29d983c898e 100644 (file)
@@ -168,6 +168,7 @@ fi
 
 if test "$result" = "no"; then
        AC_CHECK_HEADER(linux/socket.h)
+       AC_CHECK_HEADER(linux/tcp.h)
 fi
 
 AC_CHECK_HEADERS(sys/poll.h)
diff --git a/ftpd.c b/ftpd.c
index 3982a74e2d4812a1f42ccafd345995f55a1ceb1a..b35a9a04b1509d638204dd34061ba87c41420a6f 100644 (file)
--- a/ftpd.c
+++ b/ftpd.c
 #include <linux/socket.h>
 #endif
 
+#if HAVE_LINUX_TCP_H
+#include <linux/tcp.h>
+#endif
+
 #if HAVE_MMAP
 #include <sys/mman.h>
 #endif