summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-01 13:59:19 +0100
committerBenBE <BenBE@geshi.org>2020-12-02 21:03:24 +0100
commitb76eaf187a313c99fe008b069b8123b299752589 (patch)
tree54bc2656cbc1fba7b75cf7bd823f4f0af42d7673 /Settings.c
parentf7a89529330044f4e2a38e85a88ec90f839ae64e (diff)
Dynamically load libsensors at runtime
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 f2019e9a..0b4d0ed6 100644
--- a/Settings.c
+++ b/Settings.c
@@ -183,7 +183,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_LIBSENSORS
+ #ifdef HAVE_SENSORS_SENSORS_H
} else if (String_eq(option[0], "show_cpu_temperature")) {
this->showCPUTemperature = atoi(option[1]);
} else if (String_eq(option[0], "degree_fahrenheit")) {
@@ -292,7 +292,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_LIBSENSORS
+ #ifdef HAVE_SENSORS_SENSORS_H
fprintf(fd, "show_cpu_temperature=%d\n", (int) this->showCPUTemperature);
fprintf(fd, "degree_fahrenheit=%d\n", (int) this->degreeFahrenheit);
#endif
@@ -328,7 +328,7 @@ Settings* Settings_new(int initialCpuCount) {
this->countCPUsFromOne = false;
this->showCPUUsage = true;
this->showCPUFrequency = false;
- #ifdef HAVE_LIBSENSORS
+ #ifdef HAVE_SENSORS_SENSORS_H
this->showCPUTemperature = false;
this->degreeFahrenheit = false;
#endif

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