From e1574cbc83a691f2f0ff898c9976e1f5861d9686 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 30 Sep 2020 22:50:21 +0200 Subject: [PATCH] Change ifdef linux to __linux for C11 compatibility and add a fallback for unsupported operating systems in detect() --- cpuid_power.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpuid_power.c b/cpuid_power.c index b17493bc8..2526e8d0e 100644 --- a/cpuid_power.c +++ b/cpuid_power.c @@ -104,7 +104,7 @@ char *corename[] = { int detect(void){ -#ifdef linux +#ifdef __linux FILE *infile; char buffer[512], *p; @@ -214,6 +214,8 @@ switch ( id >> 16 ) { return CPUTYPE_UNKNOWN; } #endif + + return CPUTYPE_UNKNOWN; } void get_architecture(void){