summaryrefslogtreecommitdiff
path: root/src/string_func.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_func.h')
-rw-r--r--src/string_func.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/string_func.h b/src/string_func.h
index 82530ae65..7bc2d6c95 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -156,4 +156,9 @@ static inline bool IsWhitespace(WChar c)
;
}
-#endif /* STRING_FUNC_H */
+#ifndef _GNU_SOURCE
+/* strndup is a GNU extension */
+char *strndup(const char *s, size_t len);
+#endif /* WIN32 || SUNOS */
+
+#endif /* !_GNU_SOURCE */