diff options
Diffstat (limited to 'src/string.cpp')
-rw-r--r-- | src/string.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.cpp b/src/string.cpp index 58ac00a6c..4ed2da129 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -398,7 +398,7 @@ size_t Utf8TrimString(char *s, size_t maxlen) return length; } -#ifndef _GNU_SOURCE +#ifdef DEFINE_STRNDUP #include "core/math_func.hpp" char *strndup(const char *s, size_t len) { @@ -407,7 +407,7 @@ char *strndup(const char *s, size_t len) memcpy(tmp, s, len); return tmp; } -#endif /* !_GNU_SOURCE */ +#endif /* DEFINE_STRNDUP */ #ifdef DEFINE_STRCASESTR char *strcasestr(const char *haystack, const char *needle) |