summaryrefslogtreecommitdiff
path: root/src/string_func.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-22 17:59:11 +0000
committerrubidium <rubidium@openttd.org>2010-11-22 17:59:11 +0000
commit3cf9f175d8d3744196f8401a4f9388d0b5a326a8 (patch)
tree2cb5389d9f435125e8c7930f3ee6051e21358f92 /src/string_func.h
parent480f66d73f5d6693954aaeba3e17c0eeded705b5 (diff)
downloadopenttd-3cf9f175d8d3744196f8401a4f9388d0b5a326a8.tar.xz
(svn r21295) -Fix [FS#4259]: FreeBSD introduced strndup as well (MicRO)
Diffstat (limited to 'src/string_func.h')
-rw-r--r--src/string_func.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string_func.h b/src/string_func.h
index 163ca3aed..c2e48d63a 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -277,12 +277,12 @@ static inline bool IsWhitespace(WChar c)
}
/* Needed for NetBSD version (so feature) testing */
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <sys/param.h>
#endif
/* strndup is a GNU extension */
-#if defined(_GNU_SOURCE) || (defined(__NetBSD_Version__) && 400000000 <= __NetBSD_Version__)
+#if defined(_GNU_SOURCE) || (defined(__NetBSD_Version__) && 400000000 <= __NetBSD_Version__) || (defined(__FreeBSD_version) && 720000 <= __FreeBSD_version)
# undef DEFINE_STRNDUP
#else
# define DEFINE_STRNDUP