fix 32-bit Windows fio (overflow in getusage and gettimeofday)
[fio.git] / os / windows / posix.c
index 27260ce6714a378c08444a6309dfc925392c8859..7bd8ea605ac3df839a1933e0b7602af029b2bb9c 100755 (executable)
@@ -99,7 +99,7 @@ int gettimeofday(struct timeval *restrict tp, void *restrict tzp)
 {
        FILETIME fileTime;
        unsigned long long unix_time, windows_time;
-       const time_t MILLISECONDS_BETWEEN_1601_AND_1970 = 11644473600000;
+       const unsigned long long MILLISECONDS_BETWEEN_1601_AND_1970 = 11644473600000;
 
        /* Ignore the timezone parameter */
        (void)tzp;
@@ -462,7 +462,7 @@ int nice(int incr)
 
 int getrusage(int who, struct rusage *r_usage)
 {
-       const time_t SECONDS_BETWEEN_1601_AND_1970 = 11644473600;
+       const unsigned long long SECONDS_BETWEEN_1601_AND_1970 = 11644473600;
        FILETIME cTime, eTime, kTime, uTime;
        time_t time;