From 4f6eb9ceedc1f67408754502cb1d0b23e0e6f91d Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Mon, 20 Apr 1998 10:09:37 +0000 Subject: [PATCH] Add a #ifdef _THREAD_SAFE around ctime_r --- lib/libc/stdtime/localtime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c index 61614c75e79..79281577950 100644 --- a/lib/libc/stdtime/localtime.c +++ b/lib/libc/stdtime/localtime.c @@ -1345,6 +1345,7 @@ const time_t * const timep; return asctime(localtime(timep)); } +#ifdef _THREAD_SAFE char * ctime_r(timep, buf) const time_t * const timep; @@ -1353,6 +1354,7 @@ char *buf; struct tm tm; return asctime_r(localtime_r(timep, &tm), buf); } +#endif /* ** Adapted from code provided by Robert Elz, who writes: