From: Ralf Haferkamp Date: Fri, 21 Sep 2007 11:00:23 +0000 (+0000) Subject: #ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE, to be able to build with older libldap X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~619 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0b326103d67d1a3d56466909859c4f80b79af0e5;p=openldap #ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE, to be able to build with older libldap --- 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 {