From d62e10c56dd02401d89e9d5d2ae32ba51ad9744b Mon Sep 17 00:00:00 2001
From: Jakob Haufe <sur5r@sur5r.net>
Date: Thu, 28 Feb 2013 14:15:22 +0100
Subject: 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.
---
 src/print_cpu_temperature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
cgit v1.2.3