summaryrefslogtreecommitdiff
path: root/ext/ldap/ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ldap/ldap.c')
-rw-r--r--ext/ldap/ldap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 3060b96f8c..fe53349b63 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -226,7 +226,9 @@ PHP_MINIT_FUNCTION(ldap)
REGISTER_LONG_CONSTANT("LDAP_OPT_PROTOCOL_VERSION", LDAP_OPT_PROTOCOL_VERSION, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_NUMBER", LDAP_OPT_ERROR_NUMBER, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LDAP_OPT_REFERRALS", LDAP_OPT_REFERRALS, CONST_PERSISTENT | CONST_CS);
+#ifdef LDAP_OPT_RESTART
REGISTER_LONG_CONSTANT("LDAP_OPT_RESTART", LDAP_OPT_RESTART, CONST_PERSISTENT | CONST_CS);
+#endif
REGISTER_LONG_CONSTANT("LDAP_OPT_HOST_NAME", LDAP_OPT_HOST_NAME, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_STRING", LDAP_OPT_ERROR_STRING, CONST_PERSISTENT | CONST_CS);
#ifdef LDAP_OPT_MATCHED_DN
@@ -1641,7 +1643,9 @@ PHP_FUNCTION(ldap_get_option)
case LDAP_OPT_PROTOCOL_VERSION:
case LDAP_OPT_ERROR_NUMBER:
case LDAP_OPT_REFERRALS:
+#ifdef LDAP_OPT_RESTART
case LDAP_OPT_RESTART:
+#endif
{
int val;
if (ldap_get_option(ld->link, opt, &val)) {
@@ -1736,7 +1740,9 @@ PHP_FUNCTION(ldap_set_option)
} break;
/* options with boolean value */
case LDAP_OPT_REFERRALS:
+#ifdef LDAP_OPT_RESTART
case LDAP_OPT_RESTART:
+#endif
{
void *val;
convert_to_boolean_ex(newval);