Change ifdef linux to __linux for C11 compatibility

and add a fallback for unsupported operating systems in detect()
This commit is contained in:
Martin Kroeker
2020-09-30 22:50:21 +02:00
committed by GitHub
parent 0b2bb5696a
commit e1574cbc83

View File

@@ -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){