[Pkg-ocaml-maint-commits] [SCM] ocamlnet packaging branch, master, updated. debian/3.5.1-1-17-gd95f142
Stephane Glondu
steph at glondu.net
Sat Jun 1 07:05:50 UTC 2013
The following commit has been merged in the master branch:
commit 00d7f7e5cdebe640d29dd6ab4988e1d8bfc808d1
Author: Stephane Glondu <steph at glondu.net>
Date: Tue May 14 08:15:45 2013 +0200
Fix compilation with Apache 2.4
diff --git a/debian/patches/Fix-compilation-with-Apache-2.4.patch b/debian/patches/Fix-compilation-with-Apache-2.4.patch
new file mode 100644
index 0000000..e4929ba
--- /dev/null
+++ b/debian/patches/Fix-compilation-with-Apache-2.4.patch
@@ -0,0 +1,87 @@
+From: Gerd Stolpmann <gerd at gerd-stolpmann.de>
+Date: Tue, 14 May 2013 08:12:02 +0200
+Subject: Fix compilation with Apache 2.4
+
+Origin: upstream, r1844
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666825
+Signed-off-by: Stephane Glondu <steph at glondu.net>
+---
+ src/netcgi2-apache/Makefile.def | 2 +-
+ src/netcgi2-apache/Makefile.pre | 2 +-
+ src/netcgi2-apache/apache.c | 22 ++++++++++++++++++----
+ 3 files changed, 20 insertions(+), 6 deletions(-)
+
+diff --git a/src/netcgi2-apache/Makefile.def b/src/netcgi2-apache/Makefile.def
+index 9ca5375..cfbfb81 100644
+--- a/src/netcgi2-apache/Makefile.def
++++ b/src/netcgi2-apache/Makefile.def
+@@ -1,6 +1,6 @@
+ TOP_DIR=../..
+
+-PKGNAME = netcgi_apache
++PKGNAME = netcgi2-apache
+ # Keep the name in sync with the one on handler.c :
+ BUILD_EXTRA = mod_netcgi_apache.so
+
+diff --git a/src/netcgi2-apache/Makefile.pre b/src/netcgi2-apache/Makefile.pre
+index b39a595..2c83034 100644
+--- a/src/netcgi2-apache/Makefile.pre
++++ b/src/netcgi2-apache/Makefile.pre
+@@ -1,7 +1,7 @@
+ TOP_DIR=../..
+
+ PRE = 1
+-PKGNAME = netcgi_apache
++PKGNAME = netcgi2-apache
+ GENERATE = config.h netcgi_apache_mod.ml META 500netcgi_apache.info
+
+ INSTALL_EXTRA = netcgi_modtpl.cma 500netcgi_apache.info \
+diff --git a/src/netcgi2-apache/apache.c b/src/netcgi2-apache/apache.c
+index 8dae50a..e2f75cc 100644
+--- a/src/netcgi2-apache/apache.c
++++ b/src/netcgi2-apache/apache.c
+@@ -34,6 +34,7 @@
+ #include <http_config.h>
+ #include <http_protocol.h>
+ #include <http_request.h>
++#include <http_core.h>
+
+ #if APACHE2
+ #include <apr_strings.h>
+@@ -200,9 +201,9 @@ netcgi2_apache_server_is_virtual(value sv)
+
+ /*----- Connection structure. -----*/
+
+-#define CONNECTION(field) \
++#define CONNECTION(suffix,field) \
+ CAMLprim value \
+-netcgi2_apache_connection_ ## field (value cv) \
++netcgi2_apache_connection_ ## suffix (value cv) \
+ { \
+ CAMLparam1 (cv); \
+ conn_rec *c = Conn_rec_val (cv); \
+@@ -212,8 +213,21 @@ netcgi2_apache_connection_ ## field (value cv) \
+ raise_not_found (); \
+ }
+
+-CONNECTION(remote_ip)
+-CONNECTION(remote_host)
++#if AP_SERVER_MAJORVERSION_NUMBER == 1
++CONNECTION(remote_ip, remote_ip)
++#elsif AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORERSION_NUMBER < 3
++CONNECTION(remote_ip, remote_ip)
++#else
++/* Apache-2.4 and up: remote_ip is now available in two variants:
++ client_ip is the IP of the client (possibly a proxy), and
++ useragent_ip is the IP of the user agent (by trusting an http field
++ that was added by the proxy if there is a proxy)
++*/
++CONNECTION(remote_ip, client_ip)
++#endif
++
++
++CONNECTION(remote_host, remote_host)
+
+ /*----- Request structure. -----*/
+
+--
diff --git a/debian/patches/series b/debian/patches/series
index 7b00d23..216033f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ Do-not-install-apache.info-file.patch
Force-major-version-for-apache-to-2.patch
Fix-upstream-cleaning-rules.patch
ocamlnet-Set-FD_CLOEXEC-correctly-using-F_SETFD-not-.patch
+Fix-compilation-with-Apache-2.4.patch
--
ocamlnet packaging
More information about the Pkg-ocaml-maint-commits
mailing list