diff options
author | Bruce Cran <bruce@cran.org.uk> | 2012-08-16 08:49:41 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-08-16 08:49:41 +0200 |
commit | 83ae8ca2f53fe80314de9e718c8348047418af70 (patch) | |
tree | 7223c2a56a2e6fdaf0dbce44e3f745d72713d5a1 /os/windows | |
parent | 21c753874722ceff6e78c9e57768932436bce35b (diff) | |
download | fio-83ae8ca2f53fe80314de9e718c8348047418af70.tar.gz fio-83ae8ca2f53fe80314de9e718c8348047418af70.tar.bz2 |
fix 32-bit Windows fio (overflow in getusage and gettimeofday)
Fix overflow in getrusage and gettimeofday for 32-bit versions of fio
on Windows.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os/windows')
-rwxr-xr-x | os/windows/posix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c index 27260ce6..7bd8ea60 100755 --- a/os/windows/posix.c +++ b/os/windows/posix.c @@ -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; |