diff options
author | Eric Covener <covener@apache.org> | 2016-11-15 04:15:15 +0100 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2016-11-15 04:15:15 +0100 |
commit | 8c7355d3c3f1a2bf0b86b36fd8b5953eb0b47831 (patch) | |
tree | 3b4bb0b09ecd5da2d740082e8410655197bb8f45 /modules/cache/mod_socache_redis.c | |
parent | Documentation rebuild (diff) | |
download | apache2-8c7355d3c3f1a2bf0b86b36fd8b5953eb0b47831.tar.xz apache2-8c7355d3c3f1a2bf0b86b36fd8b5953eb0b47831.zip |
reorganize mod_socache_redis so it compiles w/o apr-redis
It looks like this was the original intent. The provider
is not registered if apr-redis is missing.
It was previously failing to compile due to the dirconf being
hidden behind the #ifdef guard but not the routine module
code that used it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769712 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/cache/mod_socache_redis.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/modules/cache/mod_socache_redis.c b/modules/cache/mod_socache_redis.c index b75336a902..f7482445c0 100644 --- a/modules/cache/mod_socache_redis.c +++ b/modules/cache/mod_socache_redis.c @@ -21,21 +21,23 @@ #include "apr.h" #include "apu_version.h" -/* apr_redis support requires >= 1.6 */ -#if APU_MAJOR_VERSION > 1 || \ - (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION > 5) -#define HAVE_APU_REDIS 1 -#endif - -#ifdef HAVE_APU_REDIS - #include "ap_socache.h" #include "ap_mpm.h" #include "http_log.h" -#include "apr_redis.h" #include "apr_strings.h" #include "mod_status.h" +typedef struct { + apr_uint32_t ttl; + apr_uint32_t rwto; +} socache_rd_svr_cfg; + +/* apr_redis support requires >= 1.6 */ +#if APU_MAJOR_VERSION > 1 || \ + (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION > 5) +#define HAVE_APU_REDIS 1 +#endif + /* The underlying apr_redis system is thread safe.. */ #define RD_KEY_LEN 254 @@ -62,11 +64,8 @@ module AP_MODULE_DECLARE_DATA socache_redis_module; -typedef struct { - apr_uint32_t ttl; - apr_uint32_t rwto; -} socache_rd_svr_cfg; - +#ifdef HAVE_APU_REDIS +#include "apr_redis.h" struct ap_socache_instance_t { const char *servers; apr_redis_t *rc; |