aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdtime/localtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdtime/localtime.c')
-rw-r--r--lib/libc/stdtime/localtime.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index 5de39d66fa6e..61614c75e796 100644
--- a/lib/libc/stdtime/localtime.c
+++ b/lib/libc/stdtime/localtime.c
@@ -1345,6 +1345,15 @@ const time_t * const timep;
return asctime(localtime(timep));
}
+char *
+ctime_r(timep, buf)
+const time_t * const timep;
+char *buf;
+{
+ struct tm tm;
+ return asctime_r(localtime_r(timep, &tm), buf);
+}
+
/*
** Adapted from code provided by Robert Elz, who writes:
** The "best" way to do mktime I think is based on an idea of Bob