summaryrefslogtreecommitdiff
path: root/src/get_cpu_temperature.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2009-08-31 19:34:57 +0200
committerMichael Stapelberg <michael@stapelberg.de>2009-09-01 12:39:49 +0200
commite565e313f79c78eb1be27ce6ea789011105cf549 (patch)
treedf19e857cc3320392b60077a71ea3a9d42d9939e /src/get_cpu_temperature.c
parent39b153fdd100088b567130a354824ef49b190009 (diff)
Support for (Debian) GNU/kFreeBSD
Diffstat (limited to 'src/get_cpu_temperature.c')
-rw-r--r--src/get_cpu_temperature.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/get_cpu_temperature.c b/src/get_cpu_temperature.c
index ca6b9df..9eb55bb 100644
--- a/src/get_cpu_temperature.c
+++ b/src/get_cpu_temperature.c
@@ -5,7 +5,7 @@
#include "i3status.h"
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <err.h>
#include <sys/types.h>
#include <sys/sysctl.h>
@@ -31,7 +31,7 @@ const char *get_cpu_temperature_info() {
(void)snprintf(buf, sizeof(buf), "T: ? C");
else
(void)snprintf(buf, sizeof(buf), "T: %ld C", (temp/1000));
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
int sysctl_rslt;
size_t sysctl_size = sizeof (sysctl_rslt);
if (sysctlbyname(thermal_zone,&sysctl_rslt,&sysctl_size,NULL,0))