From: Ken Raeburn Date: Fri, 21 Jul 2006 18:29:25 +0000 (+0000) Subject: * ldap_service_stash.c (krb5_ldap_readpassword): Don't require strerror_r, fall X-Git-Tag: krb5-1.6-alpha1~192 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=30db231de0763c37b482013e25eadcfc7bfdb304;p=krb5.git * ldap_service_stash.c (krb5_ldap_readpassword): Don't require strerror_r, fall back to strerror if needed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18351 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c index 99e7821ce..865fe21a1 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c @@ -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;