summaryrefslogtreecommitdiff
path: root/debug_syslog.c
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-01-04 10:19:22 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-01-04 10:19:22 +0100
commit26bffbb6a4036a1a1bc3bca99ad9dad66f0618d7 (patch)
treedf3597685dcb26345a6eb756fbbaa4b757134ee3 /debug_syslog.c
parentc0a0deec86c79d276bc4443fd0f6aef7b6b12f9f (diff)
Added debug_util.h with threadsafe localtime (localtime_r does not exist on windows.)
Diffstat (limited to 'debug_syslog.c')
-rw-r--r--debug_syslog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/debug_syslog.c b/debug_syslog.c
index 5ed82a9..2644246 100644
--- a/debug_syslog.c
+++ b/debug_syslog.c
@@ -37,6 +37,8 @@
#include <netinet/in.h>
#include <errno.h>
+#include "debug_util.h"
+
#ifndef WITH_DBG_SYSLOG
#warning debug_syslog.c compiled but WITH_DBG_SYSLOG not defined
#endif
@@ -184,7 +186,7 @@ void dbg_syslog_output(char* msg)
const time_t rawtime = time(NULL);
struct tm time;
- localtime_r(&rawtime, &time);
+ dbg_localtime(&rawtime, &time);
char buftime[SYSLOG_TIMELEN];
strftime(buftime, SYSLOG_TIMELEN, "%b %e %H:%M:%S ", &time);