From: Peter Eisentraut Date: Tue, 4 Dec 2012 11:41:21 +0000 (-0500) Subject: Fix build of LDAP URL feature X-Git-Tag: REL9_3_BETA1~632 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec8d1e32dd0a9801e62b8217b9305b6bc2119119;p=postgresql Fix build of LDAP URL feature Some code was not ifdef'ed out for non-LDAP builds. patch from Bruce Momjian --- diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 2bb661cf12..40727a9c8e 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -1385,7 +1385,9 @@ parse_hba_line(List *line, int line_num) static bool parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, int line_num) { +#ifdef USE_LDAP hbaline->ldapscope = LDAP_SCOPE_SUBTREE; +#endif if (strcmp(name, "map") == 0) { @@ -1448,11 +1450,12 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, int line_num) } else if (strcmp(name, "ldapurl") == 0) { +#ifdef LDAP_API_FEATURE_X_OPENLDAP LDAPURLDesc *urldata; int rc; +#endif REQUIRE_AUTH_OPTION(uaLDAP, "ldapurl", "ldap"); - #ifdef LDAP_API_FEATURE_X_OPENLDAP rc = ldap_url_parse(val, &urldata); if (rc != LDAP_SUCCESS)