#ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE, to be able to build with older libldap

This commit is contained in:
Ralf Haferkamp 2007-09-21 11:00:23 +00:00
parent 8c6d828a1f
commit 0b326103d6

View File

@ -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 {