The attached patch fixes the build failure. It's compile tested only, no
runtime testing at all!

Regards,
Andreas Henriksson

diff -urp apache2-redirtoservname-0.1-orig/debian/rules apache2-redirtoservname-0.1/debian/rules
--- apache2-redirtoservname-0.1-orig/debian/rules	2006-10-29 17:05:38.000000000 +0100
+++ apache2-redirtoservname-0.1/debian/rules	2006-10-29 17:09:32.000000000 +0100
@@ -17,7 +17,7 @@ endif
 config.status: configure
 	dh_testdir
 	./configure CFLAGS="$(CFLAGS)" \
-	  CPPFLAGS=-I/usr/include/apr-0 \
+	  CPPFLAGS="$(shell apr-config --includes)" \
 	  --disable-static \
 	  --host=$(DEB_HOST_GNU_TYPE) \
 	  --build=$(DEB_BUILD_GNU_TYPE) \
diff -urp apache2-redirtoservname-0.1-orig/mod_redir_to_servname.c apache2-redirtoservname-0.1/mod_redir_to_servname.c
--- apache2-redirtoservname-0.1-orig/mod_redir_to_servname.c	2004-09-21 16:02:50.000000000 +0200
+++ apache2-redirtoservname-0.1/mod_redir_to_servname.c	2006-10-29 17:11:12.000000000 +0100
@@ -4,8 +4,8 @@
 #include <apache2/http_protocol.h>
 #include <apache2/http_log.h>
 
-#include <apr-0/apr_strings.h>
-#include <apr-0/apr_tables.h>
+#include <apr_strings.h>
+#include <apr_tables.h>
 
 #ifdef __GNUC__
 #define UNUSED __attribute__((unused))
@@ -52,7 +52,7 @@ static int canonicalize_hostname(request
 	if(apr_uri_parse(r->pool, r->unparsed_uri, &uri) != APR_SUCCESS)
 		return DECLINED;
 
-	uri.scheme = (char *)ap_http_method(r);
+	uri.scheme = (char *)ap_http_scheme(r);
 	uri.hostname = (char *)cname;
 
 	char *redirect = apr_uri_unparse(r->pool, &uri, APR_URI_UNP_OMITUSERINFO);
@@ -68,7 +68,7 @@ static void register_hooks(apr_pool_t *p
 static const command_rec cmds[] = {
 	AP_INIT_FLAG("RedirectToServerName", set_enabled, NULL, RSRC_CONF,
 		"RedirectToServerName must be either \"On\" or \"Off\"."),
-	{NULL, NULL, NULL, 0, 0, NULL}
+	{ NULL, { NULL }, NULL, 0, 0, NULL }
 };
 
 module AP_MODULE_DECLARE_DATA redir_to_servname_module = {

Reply via email to