Skip to content

Commit 504b786

Browse files
Fix ability to build with Apache 2.2.
1 parent 68f9f4d commit 504b786

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

docs/release-notes/version-4.9.4.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ Bugs Fixed
1616
relying on the compiled in default, then when using mod_wsgi daemon mode, if a
1717
request body size greater than 1Gi was encountered the mod_wsgi daemon mode
1818
process would crash.
19+
20+
* Fix ability to build mod_wsgi against Apache 2.2. Do note that in general only
21+
recent versions of Apache 2.4 are supported

src/server/wsgi_apache.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ void wsgi_ap_close_listeners(void)
5252

5353
/* ------------------------------------------------------------------------- */
5454

55+
#if !AP_MODULE_MAGIC_AT_LEAST(20101106,1)
56+
57+
apr_status_t wsgi_ap_pool_cleanup_set_null(void *data_)
58+
{
59+
void **ptr = (void **)data_;
60+
*ptr = NULL;
61+
return APR_SUCCESS;
62+
}
63+
64+
#endif
65+
66+
/* ------------------------------------------------------------------------- */
67+
5568
#if (APR_MAJOR_VERSION == 0) && \
5669
(APR_MINOR_VERSION == 9) && \
5770
(APR_PATCH_VERSION < 5)

src/server/wsgi_apache.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ extern void wsgi_ap_close_listeners(void);
128128
#define ap_close_listeners wsgi_ap_close_listeners
129129
#endif
130130

131+
#if !AP_MODULE_MAGIC_AT_LEAST(20101106,1)
132+
extern apr_status_t wsgi_ap_pool_cleanup_set_null(void *);
133+
#define ap_pool_cleanup_set_null wsgi_ap_pool_cleanup_set_null
134+
#endif
135+
131136
#if (APR_MAJOR_VERSION == 0) && \
132137
(APR_MINOR_VERSION == 9) && \
133138
(APR_PATCH_VERSION < 5)

0 commit comments

Comments
 (0)