diff options
author | Bruce Cran <bruce@cran.org.uk> | 2013-04-23 15:27:23 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-04-23 08:41:57 -0600 |
commit | 5aa23eb8d6ae67c5a5e31737164307675b36518e (patch) | |
tree | ccd62678c5fb78186297b489491b5e5a0c507ea1 /os/windows | |
parent | cab2440c23426b06e7e8327c5353fbd8373dcb5a (diff) | |
download | fio-5aa23eb8d6ae67c5a5e31737164307675b36518e.tar.gz fio-5aa23eb8d6ae67c5a5e31737164307675b36518e.tar.bz2 |
Fix Windows build warnings.
winsock2.h needs to be included before windows.h.
Separate declarations and code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os/windows')
-rwxr-xr-x | os/windows/posix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c index 6a7841d5..794a707f 100755 --- a/os/windows/posix.c +++ b/os/windows/posix.c @@ -421,6 +421,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) { static LARGE_INTEGER freq = {{0,0}}; LARGE_INTEGER counts; + uint64_t t; QueryPerformanceCounter(&counts); if (freq.QuadPart == 0) @@ -429,7 +430,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) tp->tv_sec = counts.QuadPart / freq.QuadPart; /* Get the difference between the number of ns stored * in 'tv_sec' and that stored in 'counts' */ - uint64_t t = tp->tv_sec * freq.QuadPart; + t = tp->tv_sec * freq.QuadPart; t = counts.QuadPart - t; /* 't' now contains the number of cycles since the last second. * We want the number of nanoseconds, so multiply out by 1,000,000,000 |