diff --git a/src/log.c b/src/log.c index 89a861d..b112041 100644 --- a/src/log.c +++ b/src/log.c @@ -120,7 +120,7 @@ int log_add_fp(FILE *fp, int level) { static void init_event(log_Event *ev, void *udata) { if (!ev->time) { time_t t = time(NULL); - ev->time = localtime(&t, &ev->time_buf); + ev->time = localtime_r(&t, &ev->time_buf); } ev->udata = udata; }