From: Graham Leggett Date: Fri, 25 Apr 2014 11:19:56 +0000 (+0000) Subject: Only include the ldap escaping if present within APR. X-Git-Tag: 2.5.0-alpha~4257 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c88c53282b21972afd10b2c2fd6fe116a54d73d;p=apache Only include the ldap escaping if present within APR. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589995 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index 96be20e12b..8649ca5e11 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -31,7 +31,10 @@ #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 /* 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} };