From 0b326103d67d1a3d56466909859c4f80b79af0e5 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Fri, 21 Sep 2007 11:00:23 +0000 Subject: [PATCH] #ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE, to be able to build with older libldap --- contrib/ldapc++/src/LDAPException.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/ldapc++/src/LDAPException.cpp b/contrib/ldapc++/src/LDAPException.cpp index 46fd2faba4..ce8ccc4873 100644 --- a/contrib/ldapc++/src/LDAPException.cpp +++ b/contrib/ldapc++/src/LDAPException.cpp @@ -30,7 +30,12 @@ LDAPException::LDAPException(const LDAPAsynConnection *lc){ m_res_string = ""; } const char* err_string; - ldap_get_option(l,LDAP_OPT_DIAGNOSTIC_MESSAGE,&err_string); + +#ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE + ldap_get_option(l,LDAP_OPT_DIAGNOSTIC_MESSAGE ,&err_string); +#else + ldap_get_option(l,LDAP_OPT_ERROR_STRING,&err_string); +#endif if ( err_string ) { m_err_string = string(err_string); } else { -- 2.39.5