summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-04-20 10:09:37 +0000
committerphk <phk@FreeBSD.org>1998-04-20 10:09:37 +0000
commit90a1b69b8332df4a44f0595fb03e9692ca776a82 (patch)
tree589cad946c2d963534582ff3a5933a8fd7657cd1 /lib
parent70fabc443bc38cbb9405bd012c29454cfcd1afbe (diff)
downloadFreeBSD-src-90a1b69b8332df4a44f0595fb03e9692ca776a82.zip
FreeBSD-src-90a1b69b8332df4a44f0595fb03e9692ca776a82.tar.gz
Add a #ifdef _THREAD_SAFE around ctime_r
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdtime/localtime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index 61614c7..7928157 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:
OpenPOWER on IntegriCloud