From b76eaf187a313c99fe008b069b8123b299752589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 1 Dec 2020 13:59:19 +0100 Subject: Dynamically load libsensors at runtime --- Settings.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Settings.c') 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 -- cgit v1.2.3