tGuard Linux implementation in __linux__ - spoon - dwm status utility (2f30 for… | |
git clone git://src.adamsgaard.dk/spoon | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 48aaa560ef35c2fba5a86f11a8d51c90d5444eac | |
parent e5f8bc81916adcaf337d83a4e89f2fd89c7238f5 | |
Author: sin <[email protected]> | |
Date: Thu, 13 Oct 2016 16:10:46 +0100 | |
Guard Linux implementation in __linux__ | |
Diffstat: | |
M temp.c | 8 +++++++- | |
1 file changed, 7 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/temp.c b/temp.c | |
t@@ -24,7 +24,7 @@ tempread(char *buf, size_t len) | |
snprintf(buf, len, "%ddegC", (temp.value - 273150000) / 1000000); | |
return 0; | |
} | |
-#else | |
+#elif __linux__ | |
int | |
tempread(char *buf, size_t len) | |
{ | |
t@@ -41,4 +41,10 @@ tempread(char *buf, size_t len) | |
snprintf(buf, len, "%ddegC", temp / 1000); | |
return 0; | |
} | |
+#else | |
+int | |
+tempread(char *buf, size_t len) | |
+{ | |
+ return -1; | |
+} | |
#endif |