com php-src: Attempt at falling back on ldap_find_control for Mac OS: ext/ldap/config.m4 ext/ldap/ldap .c
| From: | Côme Bernigaud | Date: | Mon, 06 Jul 2015 12:54:04 +0000 |
| Subject: | com php-src: Attempt at falling back on ldap_find_control for Mac OS: ext/ldap/config.m4 ext/ldap/ldap .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87762@lists.php.net to get a copy of this message | ||
Commit: 022068342b5da0b97be1b5f3bb7b018263bd6437
Author: Côme Bernigaud <mcmic@php.net> Mon, 6 Jul 2015 14:54:04 +0200
Parents: 42f7e4c0445f3492396e05db4996cbdce362c73e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=022068342b5da0b97be1b5f3bb7b018263bd6437
Log:
Attempt at falling back on ldap_find_control for Mac OS
Changed paths:
M ext/ldap/config.m4
M ext/ldap/ldap.c
Diff:
diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4
index 036d1d3..947cebc 100644
--- a/ext/ldap/config.m4
+++ b/ext/ldap/config.m4
@@ -204,7 +204,7 @@ if test "$PHP_LDAP" != "no"; then
dnl Solaris 2.8 claims to be 2004 API, but doesn't have
dnl ldap_parse_reference() nor ldap_start_tls_s()
- AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s])
+ AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find])
dnl
dnl SASL check
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index e2bcd17..9c9e28a 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -70,6 +70,14 @@
#define PHP_LDAP_ESCAPE_FILTER 0x01
#define PHP_LDAP_ESCAPE_DN 0x02
+#ifndef HAVE_LDAP_CONTROL_FIND
+LDAPControl *ldap_control_find( const char *oid, LDAPControl **ctrls, LDAPControl ***nextctrlp)
+{
+ assert(nextctrlp == NULL);
+ return ldap_find_control(oid, ctrls);
+}
+#endif
+
typedef struct {
LDAP *link;
#if defined(HAVE_3ARG_SETREBINDPROC)