]> git.sur5r.net Git - openldap/commitdiff
#ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE, to be able to build with older libldap
authorRalf Haferkamp <ralf@openldap.org>
Fri, 21 Sep 2007 11:00:23 +0000 (11:00 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Fri, 21 Sep 2007 11:00:23 +0000 (11:00 +0000)
contrib/ldapc++/src/LDAPException.cpp

index 46fd2faba489c80c75fdf7d2f23fcb41d878d38d..ce8ccc48737520155372b7b562aecf75f1fc641b 100644 (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 {