diff options
author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2022-09-12 11:24:49 +1000 |
---|---|---|
committer | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2022-09-12 11:24:49 +1000 |
commit | 504b7865f2aa6ee5cc44f5701262ef8d31ff1e83 (patch) | |
tree | 071cba26450e32fae98cf5c0d469879d1ea3c4f0 | |
parent | 68f9f4dc90afeb31e1ec3f84997d7e9106455eeb (diff) | |
download | mod_wsgi-504b7865f2aa6ee5cc44f5701262ef8d31ff1e83.tar.gz |
Fix ability to build with Apache 2.2.
-rw-r--r-- | docs/release-notes/version-4.9.4.rst | 3 | ||||
-rw-r--r-- | src/server/wsgi_apache.c | 13 | ||||
-rw-r--r-- | src/server/wsgi_apache.h | 5 |
3 files changed, 21 insertions, 0 deletions
diff --git a/docs/release-notes/version-4.9.4.rst b/docs/release-notes/version-4.9.4.rst index 74fe6d7..d6f1b5e 100644 --- a/docs/release-notes/version-4.9.4.rst +++ b/docs/release-notes/version-4.9.4.rst @@ -16,3 +16,6 @@ Bugs Fixed relying on the compiled in default, then when using mod_wsgi daemon mode, if a request body size greater than 1Gi was encountered the mod_wsgi daemon mode process would crash. + +* Fix ability to build mod_wsgi against Apache 2.2. Do note that in general only + recent versions of Apache 2.4 are supported diff --git a/src/server/wsgi_apache.c b/src/server/wsgi_apache.c index 955ed41..375642d 100644 --- a/src/server/wsgi_apache.c +++ b/src/server/wsgi_apache.c @@ -52,6 +52,19 @@ void wsgi_ap_close_listeners(void) /* ------------------------------------------------------------------------- */ +#if !AP_MODULE_MAGIC_AT_LEAST(20101106,1) + +apr_status_t wsgi_ap_pool_cleanup_set_null(void *data_) +{ + void **ptr = (void **)data_; + *ptr = NULL; + return APR_SUCCESS; +} + +#endif + +/* ------------------------------------------------------------------------- */ + #if (APR_MAJOR_VERSION == 0) && \ (APR_MINOR_VERSION == 9) && \ (APR_PATCH_VERSION < 5) diff --git a/src/server/wsgi_apache.h b/src/server/wsgi_apache.h index 4b518f4..e6e7356 100644 --- a/src/server/wsgi_apache.h +++ b/src/server/wsgi_apache.h @@ -128,6 +128,11 @@ extern void wsgi_ap_close_listeners(void); #define ap_close_listeners wsgi_ap_close_listeners #endif +#if !AP_MODULE_MAGIC_AT_LEAST(20101106,1) +extern apr_status_t wsgi_ap_pool_cleanup_set_null(void *); +#define ap_pool_cleanup_set_null wsgi_ap_pool_cleanup_set_null +#endif + #if (APR_MAJOR_VERSION == 0) && \ (APR_MINOR_VERSION == 9) && \ (APR_PATCH_VERSION < 5) |