From 26bffbb6a4036a1a1bc3bca99ad9dad66f0618d7 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 4 Jan 2013 10:19:22 +0100 Subject: Added debug_util.h with threadsafe localtime (localtime_r does not exist on windows.) --- debug_syslog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debug_syslog.c') 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 #include +#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); -- cgit v1.2.3