summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-09-29 16:01:22 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-09-29 16:01:56 +0100
commit952366a60e0743ae025edaf370a233d0633edf7b (patch)
treea25d8c1a429163a160285d4e149af2295dd77f58 /src/util
parentc0722be9f58ef89dae98d8c459ec4f9589f97748 (diff)
downloadexternal_mesa3d-952366a60e0743ae025edaf370a233d0633edf7b.zip
external_mesa3d-952366a60e0743ae025edaf370a233d0633edf7b.tar.gz
external_mesa3d-952366a60e0743ae025edaf370a233d0633edf7b.tar.bz2
util: Fix strndup prototype on C++.
Trivial.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/strndup.c1
-rw-r--r--src/util/strndup.h10
2 files changed, 10 insertions, 1 deletions
diff --git a/src/util/strndup.c b/src/util/strndup.c
index 2c24d37..ca1c6f5 100644
--- a/src/util/strndup.c
+++ b/src/util/strndup.c
@@ -23,6 +23,7 @@
#if defined(_WIN32)
#include <stdlib.h>
+#include <string.h>
#include "strndup.h"
char *
diff --git a/src/util/strndup.h b/src/util/strndup.h
index 5434682..c5ed7a8 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