summaryrefslogtreecommitdiff
path: root/src/util/strndup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/strndup.h')
-rw-r--r--src/util/strndup.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/strndup.h b/src/util/strndup.h
index 54346823596..c5ed7a8c8d2 100644
--- a/src/util/strndup.h
+++ b/src/util/strndup.h
@@ -27,6 +27,14 @@
#if defined(_WIN32)
-extern char *strndup(const char *str, size_t max);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+char *strndup(const char *str, size_t max);
+
+#ifdef __cplusplus
+}
+#endif
#endif