projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0e4e85
)
timeval: localtime_r, gmtime_r for Windows.
author
Gurucharan Shetty
<gshetty@nicira.com>
Tue, 4 Mar 2014 00:13:46 +0000
(16:13 -0800)
committer
Gurucharan Shetty
<gshetty@nicira.com>
Tue, 4 Mar 2014 23:22:15 +0000
(15:22 -0800)
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/timeval.h
patch
|
blob
|
history
diff --git
a/lib/timeval.h
b/lib/timeval.h
index
c207f23
..
0bd74cc
100644
(file)
--- a/
lib/timeval.h
+++ b/
lib/timeval.h
@@
-40,6
+40,11
@@
BUILD_ASSERT_DECL(TYPE_IS_SIGNED(time_t));
#define TIME_MAX TYPE_MAXIMUM(time_t)
#define TIME_MIN TYPE_MINIMUM(time_t)
+#ifdef _WIN32
+#define localtime_r(timep, result) localtime_s(result, timep)
+#define gmtime_r(timep, result) gmtime_s(result, timep)
+#endif /* _WIN32 */
+
struct tm_msec {
struct tm tm;
int msec;