From d45ad6afc8453e71df8520934ad42ee109c29bc4 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 9 Jun 2020 14:05:36 +0200 Subject: [PATCH] Drop HAVE_LDAP_INIT_FD python-ldap requires OpenLDAP 2.4.0 that provides ldap_init_fd. Signed-off-by: Christian Heimes --- Modules/common.h | 3 --- Modules/functions.c | 5 ----- setup.py | 1 - 3 files changed, 9 deletions(-) diff --git a/Modules/common.h b/Modules/common.h index bde943c..1ce2eb8 100644 --- a/Modules/common.h +++ b/Modules/common.h @@ -25,9 +25,6 @@ * see https://bugs.openldap.org/show_bug.cgi?id=8671 */ #include -#ifndef HAVE_LDAP_INIT_FD -#define HAVE_LDAP_INIT_FD -#endif #else /* ldap_init_fd() has been around for a very long time * SSSD has been defining the function for a while, so it's probably OK. diff --git a/Modules/functions.c b/Modules/functions.c index e392047..ce4a924 100644 --- a/Modules/functions.c +++ b/Modules/functions.c @@ -30,8 +30,6 @@ l_ldap_initialize(PyObject *unused, PyObject *args) return (PyObject *)newLDAPObject(ld); } -#ifdef HAVE_LDAP_INIT_FD - /* initialize_fd(fileno, url) */ static PyObject * @@ -84,7 +82,6 @@ l_ldap_initialize_fd(PyObject *unused, PyObject *args) return (PyObject *)newLDAPObject(ld); } -#endif /* HAVE_LDAP_INIT_FD */ /* ldap_str2dn */ @@ -193,9 +190,7 @@ l_ldap_get_option(PyObject *self, PyObject *args) static PyMethodDef methods[] = { {"initialize", (PyCFunction)l_ldap_initialize, METH_VARARGS}, -#ifdef HAVE_LDAP_INIT_FD {"initialize_fd", (PyCFunction)l_ldap_initialize_fd, METH_VARARGS}, -#endif {"str2dn", (PyCFunction)l_ldap_str2dn, METH_VARARGS}, {"set_option", (PyCFunction)l_ldap_set_option, METH_VARARGS}, {"get_option", (PyCFunction)l_ldap_get_option, METH_VARARGS}, diff --git a/setup.py b/setup.py index 4559d84..6974785 100644 --- a/setup.py +++ b/setup.py @@ -145,7 +145,6 @@ class OpenLDAP2: ('LDAPMODULE_VERSION', pkginfo.__version__), ('LDAPMODULE_AUTHOR', pkginfo.__author__), ('LDAPMODULE_LICENSE', pkginfo.__license__), - ('HAVE_LDAP_INIT_FD', None), ] ), ],