* ldap_service_stash.c (krb5_ldap_readpassword): Don't require strerror_r, fall
authorKen Raeburn <raeburn@mit.edu>
Fri, 21 Jul 2006 18:29:25 +0000 (18:29 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 21 Jul 2006 18:29:25 +0000 (18:29 +0000)
back to strerror if needed.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18351 dc483132-0cff-0310-8789-dd5450dbe970

src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c

index 99e7821ce8c664e14505631a377acce7f4f850f0..865fe21a184f12b14db00f89910867a1cf9de589 100644 (file)
@@ -50,6 +50,11 @@ krb5_ldap_readpassword(context, ldap_context, password)
     if (ldap_context->service_password_file)
         file = ldap_context->service_password_file;
 
+#ifndef HAVE_STRERROR_R
+# undef strerror_r
+# define strerror_r(ERRNUM, BUF, SIZE) (strncpy(BUF, strerror(ERRNUM), SIZE), BUF[(SIZE)-1] = 0)
+#endif
+
     /* check whether file exists */
     if (access(file, F_OK) < 0) {
         st = errno;