summaryrefslogtreecommitdiff
path: root/src/print_cpu_temperature.c
diff options
context:
space:
mode:
authorJakob Haufe <sur5r@sur5r.net>2013-02-28 14:15:22 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-02 13:48:43 +0100
commitd62e10c56dd02401d89e9d5d2ae32ba51ad9744b (patch)
tree6bc61f8818760c7992b133e9082ff7dbb5e6731e /src/print_cpu_temperature.c
parente39f398cc5f3992d250c85d2ae095d568d0df060 (diff)
Fix FTBFS on Hurd
On GNU/Hurd, THERMAL_ZONE is undefined. This makes compilation fail as outwalk is declared inside of #ifdef THERMAL_ZONE, but it's used outside of it (by OUTPUT_FULL_TEXT). This moves the declaration outside the #ifdef to allow for successful compilation on Hurd again.
Diffstat (limited to 'src/print_cpu_temperature.c')
-rw-r--r--src/print_cpu_temperature.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_cpu_temperature.c b/src/print_cpu_temperature.c
index 0e02070..8778dad 100644
--- a/src/print_cpu_temperature.c
+++ b/src/print_cpu_temperature.c
@@ -35,9 +35,9 @@ static char *thermal_zone;
*
*/
void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const char *path, const char *format, int max_threshold) {
+ char *outwalk = buffer;
#ifdef THERMAL_ZONE
const char *walk;
- char *outwalk = buffer;
bool colorful_output = false;
if (path == NULL)