aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_i2c_sensors.c
diff options
context:
space:
mode:
authorvolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-01-17 14:40:03 +0000
committervolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-01-17 14:40:03 +0000
commit378970ea01d09e8365a5e5adea4989143b3f6b58 (patch)
treeeec46331a57bfcf1fb3e7b82d136b2e1308d5343 /plugin_i2c_sensors.c
parent473fd2d3eee3b9b675b709114858a01a01810930 (diff)
downloadlcd4linux-378970ea01d09e8365a5e5adea4989143b3f6b58.tar.gz
use own strndup() from evaluator if not available on system
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1082 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_i2c_sensors.c')
-rw-r--r--plugin_i2c_sensors.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c
index 47d080e..989f97c 100644
--- a/plugin_i2c_sensors.c
+++ b/plugin_i2c_sensors.c
@@ -74,6 +74,7 @@
#include "cfg.h"
#include "hash.h"
#include "qprintf.h"
+#include "evaluator.h" // if strndup() is not available
#ifdef WITH_DMALLOC
#include <dmalloc.h>
@@ -188,12 +189,7 @@ static int parse_i2c_sensors_procfs(const char *key)
return -1;
}
-#ifndef __MAC_OS_X_VERSION_10_3
running = strndup(buffer, sizeof(buffer));
-#else
- // there is no strndup in OSX
- running = strdup(buffer);
-#endif
while (1) {
value = strsep(&running, delim);
/* debug("%s pos %i -> %s", file, pos , value); */