[PATCH usbclerk 1/6] vdlog.h: do not use Windows specific time functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Uri Lublin <uril@xxxxxxxxxx>

---
 vdlog.h | 8 ++++----
 1 file 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 {                                                                                    \
-- 
1.8.1.1.439.g50a6b54

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]