From 593ccb14d9b87521e854d27e5e7b495b50713bf7 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Fri, 10 Jan 2020 12:42:41 +0100 Subject: [PATCH] Add missing HAS_TURBO check --- libsgxstep/sched.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libsgxstep/sched.c b/libsgxstep/sched.c index d8be00a..bf2adfe 100644 --- a/libsgxstep/sched.c +++ b/libsgxstep/sched.c @@ -113,10 +113,14 @@ int disable_turbo(void) int turbo_enabled( void ) { +#ifdef HAS_TURBO int result; - - file_read_int( "/sys/devices/system/cpu/intel_pstate/no_turbo", &result); + + file_read_int( "/sys/devices/system/cpu/intel_pstate/no_turbo", &result); return (result == 0)? 1 : 0; +#else + return 0; +#endif } int restore_system_state(void)