Package: apache-upload-progress-module / 0.2-2

0002-unixd_-functions-are-prefixed-with-ap_-in-Apache-2.4.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar@debian.org>
Date: Fri, 6 Apr 2012 13:36:20 +0200
Subject: unixd_* functions are prefixed with ap_ in Apache 2.4

Otherwise, the API is unchanged, so let's just add an extra define
for older versions of Apache.
---
 ap_backports.h        |    9 +++++++++
 mod_upload_progress.c |    3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ap_backports.h b/ap_backports.h
index b5ebbb0..e858bc8 100644
--- a/ap_backports.h
+++ b/ap_backports.h
@@ -1,3 +1,12 @@
+#include <ap_release.h>
+
+/**
+ * unixd_* functions are prefixed with ap_ since Apache 2.4
+ */
+#if (AP_SERVER_MINORVERSION_NUMBER < 2) || ((AP_SERVER_MAJORVERSION_NUMBER == 2) && (AP_SERVER_MINORVERSION_NUMBER < 4))
+#  define unixd_set_global_mutex_perms ap_unixd_set_global_mutex_perms
+#endif
+
 /**
  * This macro is not present in Apache HTTP server version 2.2.3 
  * Red-Hat 5 / CentOS 5
diff --git a/mod_upload_progress.c b/mod_upload_progress.c
index c0b57f7..8bf3567 100644
--- a/mod_upload_progress.c
+++ b/mod_upload_progress.c
@@ -2,6 +2,7 @@
 #include <ap_config.h>
 #include <http_core.h>
 #include <http_log.h>
+#include <http_protocol.h>
 #include <apr_version.h>
 #include <apr_pools.h>
 #include <apr_strings.h>
@@ -617,7 +618,7 @@ static int upload_progress_init(apr_pool_t *p, apr_pool_t *plog,
         }
 
 #ifdef AP_NEED_SET_MUTEX_PERMS
-        result = unixd_set_global_mutex_perms(config->cache_lock);
+        result = ap_unixd_set_global_mutex_perms(config->cache_lock);
         if (result != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_CRIT, result, s,
                          "Upload progress cache: failed to set mutex permissions");