diff options
Diffstat (limited to 'src/time/ctime_r.c')
-rw-r--r-- | src/time/ctime_r.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/time/ctime_r.c b/src/time/ctime_r.c new file mode 100644 index 0000000..3e24aa6 --- /dev/null +++ b/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; +} |