From 242fc5b1eee793e3c2ced43eb845429f1a4599a0 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 4 Jun 2010 11:11:07 -0400 Subject: Fix broken build against older versions of OpenLDAP OpenLDAP < 2.4 used LDAP_OPT_ERROR_STRING. It was changed to LDAP_OPT_DIAGNOSTIC_MESSAGE in 2.4. This patch will allow the TLS error messages to be displayed on either version. --- src/providers/ldap/sdap.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/providers/ldap/sdap.h') diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h index d698b55b..ef22cda0 100644 --- a/src/providers/ldap/sdap.h +++ b/src/providers/ldap/sdap.h @@ -26,6 +26,16 @@ #include #include "util/sss_ldap.h" +#ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE +#define SDAP_DIAGNOSTIC_MESSAGE LDAP_OPT_DIAGNOSTIC_MESSAGE +#else +#ifdef LDAP_OPT_ERROR_STRING +#define SDAP_DIAGNOSTIC_MESSAGE LDAP_OPT_ERROR_STRING +#else +#error No extended diagnostic message available +#endif +#endif + struct sdap_msg { struct sdap_msg *next; LDAPMessage *msg; -- cgit