diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2014-03-03 16:13:46 -0800 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2014-03-04 15:22:15 -0800 |
commit | 366d0f1106e59ac68b4516a6c66aab7065ea0d12 (patch) | |
tree | ec8cf41371ea043380a07dca8b2cc858cc4a0c77 | |
parent | f0e4e85d192f41b4b47f6381c078a1c5a5493bb4 (diff) | |
download | openvswitch-366d0f1106e59ac68b4516a6c66aab7065ea0d12.tar.gz |
timeval: localtime_r, gmtime_r for Windows.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
-rw-r--r-- | lib/timeval.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/timeval.h b/lib/timeval.h index c207f23ad..0bd74ccde 100644 --- 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; |