Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 402890 Details for
Bug 532842
www-apache/mod_mono: port to apache2.4
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
error.log
mod_mono-2.10-apache-2.4.patch (text/plain), 5.90 KB, created by
Pacho Ramos
on 2015-05-09 11:30:10 UTC
(
hide
)
Description:
error.log
Filename:
MIME Type:
Creator:
Pacho Ramos
Created:
2015-05-09 11:30:10 UTC
Size:
5.90 KB
patch
obsolete
>From 6fe457dcd6d48ad4f3640071e24dcb20b0fbb15a Mon Sep 17 00:00:00 2001 >From: Paul Schneider <paul@clogic.homeunix.net> >Date: Tue, 18 Dec 2012 16:21:41 +0100 >Subject: [PATCH] Making mod_mono compile for Apache 2.4.3 > > (Bug id 4908) >--- > configure.in | 14 ++++++++++++++ > src/mod_mono.c | 39 +++++++++++++++++++++++++++++++++------ > 2 files changed, 47 insertions(+), 6 deletions(-) > >diff --git a/configure.in b/configure.in >index d246273..6fa84b8 100644 >--- a/configure.in >+++ b/configure.in >@@ -336,6 +336,16 @@ AC_TRY_RUN([ > ], [ > ]) > >+AC_TRY_RUN([ >+ #include <ap_release.h> >+ int main () >+ { >+ return (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER == 4) ? 0 : 1; >+ } >+], [ >+ APACHE_VER=2.4 >+], [ >+]) > fi > > if test ! "$APACHE_VER" = "1.3" -a ! "$APACHE_VER" = "retry" ; then >@@ -385,6 +395,10 @@ if test "$APACHE_VER" = "2.2" ; then > AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ]) > fi > >+if test "$APACHE_VER" = "2.4" ; then >+ AC_DEFINE([APACHE24],,[Compiling for Apache >= 2.4 ]) >+fi >+ > # check for --with-mono-default-config-dir > DFLT_MONO_CONFIG_DIR=`$APXS -q SYSCONFDIR`/mod-mono-applications > AC_ARG_WITH(mono-default-config-dir, >diff --git a/src/mod_mono.c b/src/mod_mono.c >index 40e5041..ce57ad8 100644 >--- a/src/mod_mono.c >+++ b/src/mod_mono.c >@@ -388,7 +388,11 @@ enum { > apache_get_userid () > { > #ifdef HAVE_UNIXD >- return unixd_config.user_id; >+#if defined(APACHE24) >+ return ap_unixd_config.user_id; >+#else >+ return unixd_config.user_id; >+#endif > #else > return ap_user_id; > #endif >@@ -398,7 +402,11 @@ enum { > apache_get_groupid () > { > #ifdef HAVE_UNIXD >- return unixd_config.group_id; >+#if defined(APACHE24) >+ return ap_unixd_config.user_id; >+#else >+ return unixd_config.user_id; >+#endif > #else > return ap_group_id; > #endif >@@ -408,7 +416,11 @@ enum { > apache_get_username () > { > #ifdef HAVE_UNIXD >+#if defined(APACHE24) >+ return ap_unixd_config.user_name; >+#else > return unixd_config.user_name; >+#endif > #else > return ap_user_name; > #endif >@@ -487,7 +499,7 @@ enum { > > #if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD) > DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file); >- rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex); >+ rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex); > if (rv != APR_SUCCESS) { > ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv), > "Failed to set mutex permissions for %s", >@@ -854,9 +866,13 @@ enum { > #if defined(APACHE22) > return c->remote_addr->port; > #else >+#if defined(APACHE20) > apr_port_t port; > apr_sockaddr_port_get (&port, c->remote_addr); > return port; >+#else >+ return c->client_addr->port; >+#endif > #endif > > } >@@ -867,9 +883,13 @@ enum { > #if defined(APACHE22) > return r->connection->local_addr->port; > #else >+#if defined(APACHE20) > apr_port_t port; > apr_sockaddr_port_get (&port, r->connection->local_addr); > return port; >+#else >+ return r->connection->local_addr->port; >+#endif > #endif > } > >@@ -1992,9 +2012,12 @@ enum { > size += info.local_ip_len + sizeof (int32_t); > > size += sizeof (int32_t); >- >- info.remote_ip_len = strlen (r->connection->remote_ip); >- size += info.remote_ip_len + sizeof (int32_t); >+#if defined(APACHE24) >+ info.remote_ip_len = strlen (r->connection->client_ip); >+#else >+ info.remote_ip_len = strlen (r->connection->remote_ip); >+#endif >+ size += info.remote_ip_len + sizeof (int32_t); > > size += sizeof (int32_t); > >@@ -2041,7 +2064,11 @@ enum { > i = LE_FROM_INT (i); > memcpy (ptr, &i, sizeof (i)); > ptr += sizeof (int32_t); >+#if defined(APACHE24) >+ ptr += write_string_to_buffer (ptr, 0, r->connection->client_ip, info.remote_ip_len); >+#else > ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len); >+#endif > i = connection_get_remote_port (r->connection); > i = LE_FROM_INT (i); > memcpy (ptr, &i, sizeof (i)); >-- >1.7.10 > >From ce87d27104cf87215edfc0d8cf05d0b76606b956 Mon Sep 17 00:00:00 2001 >From: Paul Schneider <paul@clogic.homeunix.net> >Date: Tue, 18 Dec 2012 16:33:08 +0100 >Subject: [PATCH] Last commit introducted a compilation error for Apache > version < 2.4 > >--- > src/mod_mono.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/src/mod_mono.c b/src/mod_mono.c >index ce57ad8..4f03273 100644 >--- a/src/mod_mono.c >+++ b/src/mod_mono.c >@@ -499,8 +499,12 @@ enum { > > #if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD) > DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file); >+#if defined(APACHE24) > rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex); >- if (rv != APR_SUCCESS) { >+#else >+ rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex); >+#endif >+ if (rv != APR_SUCCESS) { > ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv), > "Failed to set mutex permissions for %s", > xsp->dashboard_lock_file); >-- >1.7.10 > >From 2c7386122fbbccfe549d9028dd01dd612d90322b Mon Sep 17 00:00:00 2001 >From: Paul Schneider <paul@clogic.homeunix.net> >Date: Tue, 18 Dec 2012 17:18:59 +0100 >Subject: [PATCH] Fix an introduced compilation error for Apache versions < > 2.0 > >--- > src/mod_mono.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/src/mod_mono.c b/src/mod_mono.c >index 4f03273..31bccc9 100644 >--- a/src/mod_mono.c >+++ b/src/mod_mono.c >@@ -870,12 +870,12 @@ enum { > #if defined(APACHE22) > return c->remote_addr->port; > #else >-#if defined(APACHE20) >+#if defined(APACHE24) >+ return c->client_addr->port; >+#else > apr_port_t port; > apr_sockaddr_port_get (&port, c->remote_addr); > return port; >-#else >- return c->client_addr->port; > #endif > #endif > >@@ -887,12 +887,12 @@ enum { > #if defined(APACHE22) > return r->connection->local_addr->port; > #else >-#if defined(APACHE20) >+#if defined(APACHE24) >+ return r->connection->local_addr->port; >+#else > apr_port_t port; > apr_sockaddr_port_get (&port, r->connection->local_addr); > return port; >-#else >- return r->connection->local_addr->port; > #endif > #endif > } >-- >1.7.10 > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 532842
:
402888
|
402890
|
402892
|
403308