summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2013-03-10 15:43:51 +0100
committerArthur de Jong <arthur@arthurdejong.org>2013-03-10 23:14:17 +0100
commitf7c6771538371e4797a29ec6e5a8ea91d955beeb (patch)
treee6d6f31f6613dcd3512e3b7922ab1fcb9068bb85 /compat
parentba5f39f7c21cf3444ca2e84b0c02e89a1f36cd66 (diff)
also support systems without bet_get_enum()
Diffstat (limited to 'compat')
-rw-r--r--compat/ldap_parse_passwordpolicy_control.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/ldap_parse_passwordpolicy_control.c b/compat/ldap_parse_passwordpolicy_control.c
index 88a0d6a..3517085 100644
--- a/compat/ldap_parse_passwordpolicy_control.c
+++ b/compat/ldap_parse_passwordpolicy_control.c
@@ -52,7 +52,9 @@ int ldap_parse_passwordpolicy_control(LDAP UNUSED(*ld), LDAPControl *ctrl,
ber_tag_t tag;
ber_len_t berLen;
char *last;
+#ifdef HAVE_BER_GET_ENUM
int err = PP_noError;
+#endif /* HAVE_BER_GET_ENUM */
/* get a BerElement from the control */
ber = ber_init(&ctrl->ldctl_value);
if (ber == NULL)
@@ -86,6 +88,7 @@ int ldap_parse_passwordpolicy_control(LDAP UNUSED(*ld), LDAPControl *ctrl,
return LDAP_DECODING_ERROR;
}
break;
+#ifdef HAVE_BER_GET_ENUM
case PPOLICY_ERROR:
if (ber_get_enum(ber, &err) == LBER_DEFAULT)
{
@@ -93,6 +96,7 @@ int ldap_parse_passwordpolicy_control(LDAP UNUSED(*ld), LDAPControl *ctrl,
return LDAP_DECODING_ERROR;
}
break;
+#endif /* HAVE_BER_GET_ENUM */
default:
ber_free(ber, 1);
return LDAP_DECODING_ERROR;