From ec5f80adc1e16655eb3a31c92a39ec57a5da2a08 Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Fri, 9 Apr 2021 15:49:21 +0200 Subject: [PATCH] [v0.97] Fix compilation in macOS --- src/common/main.c | 2 +- src/x86/cpuid.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/main.c b/src/common/main.c index d3a42ca..96d9667 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -14,7 +14,7 @@ #include "../arm/midr.h" #endif -static const char* VERSION = "0.96"; +static const char* VERSION = "0.97"; void print_help(char *argv[]) { const char **t = args_str; diff --git a/src/x86/cpuid.c b/src/x86/cpuid.c index 1ac93d7..4d7a284 100755 --- a/src/x86/cpuid.c +++ b/src/x86/cpuid.c @@ -887,7 +887,6 @@ void print_debug(struct cpuInfo* cpu) { free_cpuinfo_struct(cpu); } -// TODO: Fix on macOS // TODO: Query HV and Xeon Phi levels void print_raw(struct cpuInfo* cpu) { uint32_t eax; @@ -899,10 +898,12 @@ void print_raw(struct cpuInfo* cpu) { printf("--------------------------------------------------------------\n"); for(int c=0; c < cpu->topo->total_cores; c++) { + #ifndef __APPLE__ if(!bind_to_cpu(c)) { printErr("Failed binding to CPU %d", c); return; } + #endif printf("CPU %d:\n", c);