Commits

Peter Eisentraut  committed ec8d1e3

Fix build of LDAP URL feature

Some code was not ifdef'ed out for non-LDAP builds.

patch from Bruce Momjian

  • Participants
  • Parent commits 5ce108b

Comments (0)

Files changed (1)

File src/backend/libpq/hba.c

 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)
 	{
 	}
 	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)