From: Hallvard Furuseth Date: Sat, 6 Mar 1999 04:23:17 +0000 (+0000) Subject: Obey CTIME_R_RETURNS_INT X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~466 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9bef1a2bc1c8d69d0caeaef6895cbbffe24a664c;p=openldap Obey CTIME_R_RETURNS_INT --- diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c index 1308eb621d..eb0517d9bf 100644 --- a/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c @@ -70,6 +70,8 @@ char *ldap_pvt_ctime( const time_t *tp, char *buf ) #ifdef USE_CTIME_R # if (CTIME_R_NARGS > 3) || (CTIME_R_NARGS < 2) choke me! nargs should have 2 or 3 +# elif CTIME_R_NARGS > 2 && defined(CTIME_R_RETURNS_INT) + return( ctime_r(tp,buf,26) < 0 ? 0 : buf ); # elif CTIME_R_NARGS > 2 return ctime_r(tp,buf,26); # else