Skip to content

Commit e1574cb

Browse files
authored
Change ifdef linux to __linux for C11 compatibility
and add a fallback for unsupported operating systems in detect()
1 parent 0b2bb56 commit e1574cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpuid_power.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ char *corename[] = {
104104

105105
int detect(void){
106106

107-
#ifdef linux
107+
#ifdef __linux
108108
FILE *infile;
109109
char buffer[512], *p;
110110

@@ -214,6 +214,8 @@ switch ( id >> 16 ) {
214214
return CPUTYPE_UNKNOWN;
215215
}
216216
#endif
217+
218+
return CPUTYPE_UNKNOWN;
217219
}
218220

219221
void get_architecture(void){

0 commit comments

Comments
 (0)