From: Jose Fonseca Date: Tue, 29 Sep 2015 15:01:22 +0000 (+0100) Subject: util: Fix strndup prototype on C++. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=952366a60e0743ae025edaf370a233d0633edf7b;p=mesa.git util: Fix strndup prototype on C++. Trivial. --- diff --git a/src/util/strndup.c b/src/util/strndup.c index 2c24d3789c2..ca1c6f53b57 100644 --- a/src/util/strndup.c +++ b/src/util/strndup.c @@ -23,6 +23,7 @@ #if defined(_WIN32) #include +#include #include "strndup.h" char * 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