From 53373261adef11e8f23c01e31a4233507a36c032 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 4 Mar 2022 10:47:45 +0100 Subject: [PATCH] fix `example/perf.c` compilation In case this ifdef-elseif-chain falls back to the else path, the macro to `clock()` wasn't defined. Signed-off-by: Steffen Jaeckel --- examples/perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/perf.c b/examples/perf.c index f6b719f..e6fa0df 100644 --- a/examples/perf.c +++ b/examples/perf.c @@ -81,7 +81,7 @@ static uint64_t timer, skew = 0; /* RDTSC from Scott Duplichan */ static uint64_t rdtsc(void) { -#if defined __GNUC__ && !defined(LTC_NO_ASM) +#if defined __GNUC__ #if defined(__i386__) || defined(__x86_64__) /* version from http://www.mcs.anl.gov/~kazutomo/rdtsc.html * the old code always got a warning issued by gcc, clang did not @@ -117,7 +117,7 @@ static uint64_t rdtsc(void) __asm__ __volatile__("mrs %0, cntvct_el0" : "=r"(CNTVCT_EL0)); return CNTVCT_EL0; #else - return XCLOCK(); + return clock(); #endif /* Microsoft and Intel Windows compilers */ @@ -131,7 +131,7 @@ static uint64_t rdtsc(void) #endif return __getReg(3116); #else - return XCLOCK(); + return clock(); #endif }