From f1e3a7dae3e15464ff41744d1331aef2cb41d503 Mon Sep 17 00:00:00 2001 From: Kurt Miller Date: Tue, 28 Jan 2020 15:49:03 -0500 Subject: [PATCH] Fix build on architectures that don't have both cpu clock and __thread support. --- gettime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.25.1