diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/compat/posix_win.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c index bb3e653..bed8c84 100644 --- a/crypto/compat/posix_win.c +++ b/crypto/compat/posix_win.c | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | #define NO_REDEF_POSIX_FUNCTIONS | 10 | #define NO_REDEF_POSIX_FUNCTIONS |
11 | 11 | ||
12 | #include <sys/time.h> | ||
13 | |||
12 | #include <ws2tcpip.h> | 14 | #include <ws2tcpip.h> |
13 | #include <windows.h> | 15 | #include <windows.h> |
14 | 16 | ||
@@ -306,7 +308,7 @@ int gettimeofday(struct timeval * tp, struct timezone * tzp) | |||
306 | time = ((uint64_t)file_time.dwLowDateTime); | 308 | time = ((uint64_t)file_time.dwLowDateTime); |
307 | time += ((uint64_t)file_time.dwHighDateTime) << 32; | 309 | time += ((uint64_t)file_time.dwHighDateTime) << 32; |
308 | 310 | ||
309 | tp->tv_sec = (long)((time - EPOCH) / 10000000L); | 311 | tp->tv_sec = (long long)((time - EPOCH) / 10000000L); |
310 | tp->tv_usec = (long)(system_time.wMilliseconds * 1000); | 312 | tp->tv_usec = (long)(system_time.wMilliseconds * 1000); |
311 | return 0; | 313 | return 0; |
312 | } | 314 | } |