From 7a28d81b441e5c29f0e0a988306f7c5988bf20c6 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Tue, 28 Dec 2021 20:11:54 +0100 Subject: Reflect OpenLDAP 2.5 upstream change from libldap_r to libldap Starting with OpenLDAP 2.5 upstream decided to merge the non-threaded libldap_r library into the threaded libldap library. And starting with OpenLDAP 2.6 common Linux distributions such as Fedora do not ship the compatibility symbolic link anymore (which leads to a build failure), thus the linking tests for libldap_r and uses alternatively libldap. See also: - https://lists.openldap.org/hyperkitty/list/openldap-announce@openldap.org/thread/BH3VDPG6IYYF5L5U6LZGHHKMJY5HFA3L/ - https://bugzilla.redhat.com/show_bug.cgi?id=2032707 --- modules/extra/m_ldap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/extra') diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 34f1310c4..a462c46b1 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -9,8 +9,8 @@ * Based on the original code of Services by Andy Church. */ -/* RequiredLibraries: ldap_r,lber */ -/* RequiredWindowsLibraries: libldap_r,liblber */ +/* RequiredLibraries: ldap_r|ldap,lber */ +/* RequiredWindowsLibraries: libldap_r|libldap,liblber */ #include "module.h" #include "modules/ldap.h" -- cgit From a1a1b3ad018c7a54b82a2b0f4dcbac9691f6ba8b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 28 Dec 2021 19:16:47 +0000 Subject: Add a build time check that OpenLDAP is reentrant. --- modules/extra/m_ldap.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/extra') diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index a462c46b1..1005d2efe 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -16,6 +16,11 @@ #include "modules/ldap.h" #include +#if defined LDAP_API_FEATURE_X_OPENLDAP_REENTRANT && !LDAP_API_FEATURE_X_OPENLDAP_REENTRANT +# error Anope requires OpenLDAP to be built as reentrant. +#endif + + class LDAPService; static Pipe *me; -- cgit