summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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