summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/time/ctime_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/time/ctime_r.c')
-rw-r--r--libc-top-half/musl/src/time/ctime_r.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/time/ctime_r.c b/libc-top-half/musl/src/time/ctime_r.c
new file mode 100644
index 0000000..3e24aa6
--- /dev/null
+++ b/libc-top-half/musl/src/time/ctime_r.c
@@ -0,0 +1,7 @@
+#include <time.h>
+
+char *ctime_r(const time_t *t, char *buf)
+{
+ struct tm tm, *tm_p = localtime_r(t, &tm);
+ return tm_p ? asctime_r(tm_p, buf) : 0;
+}