mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.98] Fix compilation in different platforms
This commit is contained in:
@@ -671,13 +671,16 @@ struct frequency* get_frequency_info(struct cpuInfo* cpu) {
|
||||
freq->base = UNKNOWN_FREQ;
|
||||
}
|
||||
if(freq->max == 0) {
|
||||
printWarn("Read max CPU frequency from CPUID and got 0 MHz. Using udev");
|
||||
freq->max = get_max_freq_from_file(0, cpu->hv->present);
|
||||
printWarn("Read max CPU frequency from CPUID and got 0 MHz");
|
||||
#ifdef __linux__
|
||||
printWarn("Using udev to detect frequency");
|
||||
freq->max = get_max_freq_from_file(0, cpu->hv->present);
|
||||
|
||||
if(freq->max == 0) {
|
||||
printWarn("Read max CPU frequency from udev and got 0 MHz");
|
||||
freq->max = UNKNOWN_FREQ;
|
||||
}
|
||||
if(freq->max == 0) {
|
||||
printWarn("Read max CPU frequency from udev and got 0 MHz");
|
||||
freq->max = UNKNOWN_FREQ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user