From 9bef1a2bc1c8d69d0caeaef6895cbbffe24a664c Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 6 Mar 1999 04:23:17 +0000 Subject: [PATCH] Obey CTIME_R_RETURNS_INT --- libraries/libldap/util-int.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.5