summaryrefslogtreecommitdiff
path: root/src/get_cpu_temperature.c
diff options
context:
space:
mode:
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))