]> granicus.if.org Git - apache/commitdiff
Only include the ldap escaping if present within APR.
authorGraham Leggett <minfrin@apache.org>
Fri, 25 Apr 2014 11:19:56 +0000 (11:19 +0000)
committerGraham Leggett <minfrin@apache.org>
Fri, 25 Apr 2014 11:19:56 +0000 (11:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589995 13f79535-47bb-0310-9956-ffa450edef68

server/util_expr_eval.c

index 96be20e12b0d8cb38f930aa0fb9522bebbd80a9a..8649ca5e113f6d4abcd31c2f1bf24da1b47f18cf 100644 (file)
 #include "apr_fnmatch.h"
 #include "apr_base64.h"
 #include "apr_sha1.h"
+#include "apr_version.h"
+#if APR_VERSION_AT_LEAST(1,5,0)
 #include "apr_escape.h"
+#endif
 
 #include <limits.h>     /* for INT_MAX */
 
@@ -1062,12 +1065,13 @@ static const char *md5_func(ap_expr_eval_ctx_t *ctx, const void *data,
        return ap_md5(ctx->p, (const unsigned char *)arg);
 }
 
+#if APR_VERSION_AT_LEAST(1,6,0)
 static const char *ldap_func(ap_expr_eval_ctx_t *ctx, const void *data,
                                const char *arg)
 {
         return apr_pescape_ldap(ctx->p, arg, APR_ESCAPE_STRING, APR_ESCAPE_LDAP_ALL);
 }
-
+#endif
 
 #define MAX_FILE_SIZE 10*1024*1024
 static const char *file_func(ap_expr_eval_ctx_t *ctx, const void *data,
@@ -1652,7 +1656,9 @@ static const struct expr_provider_single string_func_providers[] = {
     { unbase64_func,        "unbase64",       NULL, 0 },
     { sha1_func,            "sha1",           NULL, 0 },
     { md5_func,             "md5",            NULL, 0 },
+#if APR_VERSION_AT_LEAST(1,6,0)
     { ldap_func,            "ldap",           NULL, 0 },
+#endif
     { NULL, NULL, NULL}
 };