summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap.h
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-06-04 11:11:07 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-06-06 13:38:19 -0400
commit242fc5b1eee793e3c2ced43eb845429f1a4599a0 (patch)
tree52e983046b01d45c09cb8e0cabd267774a888013 /src/providers/ldap/sdap.h
parenta777a485bf73be24404fe3094c3688e604d8cbf8 (diff)
downloadsssd-242fc5b1eee793e3c2ced43eb845429f1a4599a0.tar.gz
sssd-242fc5b1eee793e3c2ced43eb845429f1a4599a0.tar.xz
sssd-242fc5b1eee793e3c2ced43eb845429f1a4599a0.zip
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.
Diffstat (limited to 'src/providers/ldap/sdap.h')
-rw-r--r--src/providers/ldap/sdap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index d698b55bc..ef22cda06 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -26,6 +26,16 @@
#include <ldap.h>
#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;