httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r780382 - in /httpd/mod_ftp/trunk: build/Makefile.apxs configure.apxs modules/ftp/config.m4 modules/ftp/ftp_config.h.in modules/ftp/ftp_data_connection.c
Date Sun, 31 May 2009 08:25:10 GMT
Author: wrowe
Date: Sun May 31 08:25:10 2009
New Revision: 780382

URL: http://svn.apache.org/viewvc?rev=780382&view=rev
Log:
Resolve SOL_IP vs IPPROTO_IP.

Modified:
    httpd/mod_ftp/trunk/build/Makefile.apxs
    httpd/mod_ftp/trunk/configure.apxs
    httpd/mod_ftp/trunk/modules/ftp/config.m4
    httpd/mod_ftp/trunk/modules/ftp/ftp_config.h.in
    httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c

Modified: httpd/mod_ftp/trunk/build/Makefile.apxs
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/build/Makefile.apxs?rev=780382&r1=780381&r2=780382&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/build/Makefile.apxs (original)
+++ httpd/mod_ftp/trunk/build/Makefile.apxs Sun May 31 08:25:10 2009
@@ -21,12 +21,14 @@
 		conftest_netinet_ip_h.c \
 		conftest_struct_msghdr_msg_control.c \
 		conftest_struct_msghdr_msg_accrights.c \
+		conftest_SOL_IP.c \
 		*.loT
 TARGETS       = conftest_fchmod \
 		conftest_arpa_ftp_h \
 		conftest_netinet_ip_h \
-		conftest_struct_msghdr_msg_control.c \
-		conftest_struct_msghdr_msg_accrights.c \
+		conftest_struct_msghdr_msg_control \
+		conftest_struct_msghdr_msg_accrights \
+		conftest_SOL_IP \
 
 PROGRAM_LDADD        = 
 PROGRAM_DEPENDENCIES = 
@@ -42,6 +44,9 @@
 conftest_netinet_ip_h: conftest_netinet_ip_h.lo
 	@echo "success" > $@
 
+conftest_SOL_IP: conftest_SOL_IP.lo
+	@echo "success" > $@
+
 conftest_struct_msghdr_msg_control: conftest_struct_msghdr_msg_control.lo
 	@echo "success" > $@
 
@@ -57,9 +62,17 @@
 	@echo "#include <arpa/ftp.h>" > $@
 
 conftest_netinet_ip_h.c:
-	@echo "#include <sys/socket.h>" > $@
+	@echo "#include <sys/types.h>" > $@
+	@echo "#include <sys/socket.h>" >> $@
 	@echo "#include <netinet/ip.h>" >> $@
 
+conftest_SOL_IP.c:
+	@echo "#include <sys/types.h>" > $@
+	@echo "#include <sys/socket.h>" >> $@
+	@echo "#include <netinet/ip.h>" >> $@
+	@echo "int main ()" >> $@
+	@echo "{ return SOL_IP; }" >> $@
+
 conftest_struct_msghdr_msg_control.c:
 	@echo "#include <sys/types.h>" > $@
 	@echo "#include <sys/socket.h>" >> $@

Modified: httpd/mod_ftp/trunk/configure.apxs
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/configure.apxs?rev=780382&r1=780381&r2=780382&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/configure.apxs (original)
+++ httpd/mod_ftp/trunk/configure.apxs Sun May 31 08:25:10 2009
@@ -82,6 +82,11 @@
 if make local-clean conftest_netinet_ip_h; then
   found_features="$found_features \
     -e \"s/^#undef \(HAVE_NETINET_IP_H\)[ \t]*/#define \1/;\""
+
+  if make local-clean conftest_SOL_IP; then
+    found_features="$found_features \
+      -e \"s/^#undef \(HAVE_SOL_IP\)[ \t]*/#define \1/;\""
+  fi
 fi
 
 if make conftest_struct_msghdr_msg_control; then

Modified: httpd/mod_ftp/trunk/modules/ftp/config.m4
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/config.m4?rev=780382&r1=780381&r2=780382&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/config.m4 (original)
+++ httpd/mod_ftp/trunk/modules/ftp/config.m4 Sun May 31 08:25:10 2009
@@ -39,6 +39,11 @@
     AC_CHECK_FUNCS(fchmod)
     AC_CHECK_HEADERS(arpa/ftp.h)
     AC_CHECK_HEADERS(netinet/ip.h)
+    AC_CHECK_DECL(SOL_IP, , , [
+        #include <sys/types.h>
+        #include <sys/socket.h>
+        #include <netinet/ip.h>
+])
     AC_CHECK_MEMBERS([struct msghdr.msg_control, struct msghdr.msg_accrights],
         [], [], [
         #include <sys/types.h>

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_config.h.in
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_config.h.in?rev=780382&r1=780381&r2=780382&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_config.h.in (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_config.h.in Sun May 31 08:25:10 2009
@@ -9,6 +9,9 @@
 /* Define to 1 if you have the `netinet/ip.h' header. */
 #undef HAVE_NETINET_IP_H
 
+/* Define to 1 if you have the declaration of `SOL_IP'. */
+#undef HAVE_SOL_IP
+
 /* Define to 1 if `msg_accrights' is member of `struct msghdr'. */
 #undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
 

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c?rev=780382&r1=780381&r2=780382&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c Sun May 31 08:25:10 2009
@@ -178,7 +178,11 @@
 #ifdef HAVE_NETINET_IP_H
     sopt = IPTOS_THROUGHPUT;
     if (((apr_os_sock_get(&sd, fc->datasock)) == APR_SUCCESS) &&
+#ifdef HAVE_SOL_IP
          (setsockopt(sd, SOL_IP, IP_TOS, &sopt, sizeof(sopt)) < 0)) {
+#else
+         (setsockopt(sd, IPPROTO_IP, IP_TOS, &sopt, sizeof(sopt)) < 0)) {
+#endif
         ap_log_error(APLOG_MARK, APLOG_ERR, errno, r->server,
                      "Failed to set TOS priority");
     }



Mime
View raw message