summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2013-01-01 10:59:04 +0100
committerJens Axboe <axboe@kernel.dk>2013-01-01 10:59:04 +0100
commit4de98eb0e68314ba36fcfc2722a1c9b3bc5d3318 (patch)
treeeaee24b72f115b4201d75e648daa2dfdbcd25bc6
parent15cf40b2844caad4cf8da0cdaeddd132cd6adefc (diff)
downloadfio-4de98eb0e68314ba36fcfc2722a1c9b3bc5d3318.tar.gz
fio-4de98eb0e68314ba36fcfc2722a1c9b3bc5d3318.tar.bz2
Move 'tsc_reliable' outside of ARCH_HAVE_CPU_CLOCK
Otherwise we fail building on architectures that do not define it, as reported by Dan: cc -o gettime.o -c -std=gnu99 -Wwrite-strings -Wall -O3 -g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31 -march=z9-109 -mtune=z10 -DFIO_VERSION='"fio-2.0.12.2"' -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG gettime.c gettime.c: In function 'fio_clock_init': gettime.c:317:6: error: 'tsc_reliable' undeclared (first use in this function) gettime.c:317:6: note: each undeclared identifier is reported only once for each function it appears in make: *** [gettime.o] Error 1 Reported-by: Dan HorĂ¡k <dan@danny.cz> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--gettime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gettime.c b/gettime.c
index df329f66..05625d1b 100644
--- a/gettime.c
+++ b/gettime.c
@@ -16,8 +16,8 @@
#ifdef ARCH_HAVE_CPU_CLOCK
static unsigned long cycles_per_usec;
static unsigned long inv_cycles_per_usec;
-int tsc_reliable = 0;
#endif
+int tsc_reliable = 0;
struct tv_valid {
struct timeval last_tv;