summaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-05-21 15:56:19 +0000
committerrubidium <rubidium@openttd.org>2010-05-21 15:56:19 +0000
commite3df7caf18e6260dad84b8e4dd09f11886fbbe0e (patch)
treeb4f47a5188725c0bc8c66f8b5d14a59bf24707be /src/string.cpp
parentd8d37466afe02034fef2447a81fe4fe2469d352b (diff)
downloadopenttd-e3df7caf18e6260dad84b8e4dd09f11886fbbe0e.tar.xz
(svn r19874) -Fix [FS#3845]: NetBSD compilation was still broken in some cases (Krille)
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp4
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)