summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-22 20:02:01 +0100
committerChristian Goettsche <cgzones@googlemail.com>2021-02-05 16:32:25 +0100
commitfd2a0cf4219ac6b000e3ef46e1958edd2ff41a67 (patch)
tree1c556519ebb1c235f2e8954e2de25d35dd1c2582 /Settings.c
parent64a1ab848f4cba7b9dd4705a169034e39048d27d (diff)
FreeBSD: add support for CPU frequency and temperature
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Settings.c b/Settings.c
index f12a51f4..421ec552 100644
--- a/Settings.c
+++ b/Settings.c
@@ -205,7 +205,7 @@ static bool Settings_read(Settings* this, const char* fileName, int initialCpuCo
this->showCPUUsage = atoi(option[1]);
} else if (String_eq(option[0], "show_cpu_frequency")) {
this->showCPUFrequency = atoi(option[1]);
- #ifdef HAVE_SENSORS_SENSORS_H
+ #ifdef BUILD_WITH_CPU_TEMP
} else if (String_eq(option[0], "show_cpu_temperature")) {
this->showCPUTemperature = atoi(option[1]);
} else if (String_eq(option[0], "degree_fahrenheit")) {
@@ -319,7 +319,7 @@ bool Settings_write(Settings* this) {
fprintf(fd, "cpu_count_from_one=%d\n", (int) this->countCPUsFromOne);
fprintf(fd, "show_cpu_usage=%d\n", (int) this->showCPUUsage);
fprintf(fd, "show_cpu_frequency=%d\n", (int) this->showCPUFrequency);
- #ifdef HAVE_SENSORS_SENSORS_H
+ #ifdef BUILD_WITH_CPU_TEMP
fprintf(fd, "show_cpu_temperature=%d\n", (int) this->showCPUTemperature);
fprintf(fd, "degree_fahrenheit=%d\n", (int) this->degreeFahrenheit);
#endif
@@ -358,7 +358,7 @@ Settings* Settings_new(int initialCpuCount) {
this->countCPUsFromOne = false;
this->showCPUUsage = true;
this->showCPUFrequency = false;
- #ifdef HAVE_SENSORS_SENSORS_H
+ #ifdef BUILD_WITH_CPU_TEMP
this->showCPUTemperature = false;
this->degreeFahrenheit = false;
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy