From: Kurt Miller Date: Tue, 28 Jan 2020 20:49:03 +0000 (-0500) Subject: Fix build on architectures that don't have both cpu clock and __thread X-Git-Tag: fio-3.18~5^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f1e3a7dae3e15464ff41744d1331aef2cb41d503;p=fio.git Fix build on architectures that don't have both cpu clock and __thread support. --- diff --git a/gettime.c b/gettime.c index 272a3e62..c3a4966b 100644 --- a/gettime.c +++ b/gettime.c @@ -371,7 +371,7 @@ static int calibrate_cpu_clock(void) } #endif // ARCH_HAVE_CPU_CLOCK -#ifndef CONFIG_TLS_THREAD +#if defined(ARCH_HAVE_CPU_CLOCK) && !defined(CONFIG_TLS_THREAD) void fio_local_clock_init(void) { struct tv_valid *t; @@ -398,7 +398,7 @@ void fio_clock_init(void) if (fio_clock_source == fio_clock_source_inited) return; -#ifndef CONFIG_TLS_THREAD +#if defined(ARCH_HAVE_CPU_CLOCK) && !defined(CONFIG_TLS_THREAD) if (pthread_key_create(&tv_tls_key, kill_tv_tls_key)) log_err("fio: can't create TLS key\n"); #endif