summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2013-05-18 02:42:39 +0200
committerArnon Gilboa <agilboa@redhat.com>2013-05-19 09:19:56 +0300
commitd9087356a1b44633354653b00496547ce4267560 (patch)
tree29b8169b71c59dad6790ed411fd586564f193b06
parente76d137da838ffd94128429b2aaf8d69580ec36c (diff)
vdlog.h: do not use Windows specific time functions
-rw-r--r--vdlog.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/vdlog.h b/vdlog.h
index 5a794b6..9fc2cec 100644
--- a/vdlog.h
+++ b/vdlog.h
@@ -61,11 +61,11 @@ static unsigned int log_level = LOG_INFO;
VDLog* log = VDLog::get(); \
const char *type_as_char[] = { "DEBUG", "INFO", "WARN", "ERROR", "FATAL" }; \
struct _timeb now; \
- struct tm today; \
+ struct tm *today; \
char datetime_str[20]; \
- _ftime_s(&now); \
- localtime_s(&today, &now.time); \
- strftime(datetime_str, 20, "%Y-%m-%d %H:%M:%S", &today); \
+ _ftime(&now); \
+ today = localtime(&now.time); \
+ strftime(datetime_str, 20, "%Y-%m-%d %H:%M:%S", today); \
if (log) { \
log->PRINT_LINE(type_as_char[type], format, datetime_str, now.millitm, ## __VA_ARGS__); \
} else { \