summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim King <taking@google.com>2016-02-01 11:29:49 -0800
committerTim King <taking@google.com>2016-02-01 11:29:49 -0800
commit88a0b432b584ce79892a85b1ef97ba799b9ce01e (patch)
tree95e0309e95d057343b87bd399b5fe97a494a01e8
parent5b9cbe12ca8a9c0058e7bdf993b74fc45f1300d2 (diff)
Generalizing lib/strtok_r.c so that it can always be compiled.
-rw-r--r--src/lib/strtok_r.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/strtok_r.c b/src/lib/strtok_r.c
index 320da746e..da49aaada 100644
--- a/src/lib/strtok_r.c
+++ b/src/lib/strtok_r.c
@@ -20,9 +20,11 @@
#include <stdio.h>
#include <string.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+#ifndef HAVE_STRTOK_R
char* strtok_r(char *str, const char *delim, char **saveptr) {
if(str == NULL) {
@@ -36,6 +38,7 @@ char* strtok_r(char *str, const char *delim, char **saveptr) {
}
}
+#endif /* ifndef HAVE_STRTOK_R */
#ifdef __cplusplus
}/* extern "C" */
#endif /* __cplusplus */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback