aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2015-05-08 12:09:26 +0000
committerImre Kaloz <kaloz@openwrt.org>2015-05-08 12:09:26 +0000
commit56a530ab1918673bc02d7543dcbd23551d8f5751 (patch)
treee30662852a50d77d9a367398da07c5da8e2a6846 /tools/include
parent6cc98f6c55f4d9313a5637c909ff1419c795e6ec (diff)
downloadmaster-187ad058-56a530ab1918673bc02d7543dcbd23551d8f5751.tar.gz
master-187ad058-56a530ab1918673bc02d7543dcbd23551d8f5751.tar.bz2
master-187ad058-56a530ab1918673bc02d7543dcbd23551d8f5751.zip
tools: host/include/getline.h: fix FreeBSD 8.0+ support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45628 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/getline.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/include/getline.h b/tools/include/getline.h
index 3ac21715b8..7b320f77ce 100644
--- a/tools/include/getline.h
+++ b/tools/include/getline.h
@@ -32,7 +32,11 @@
#include <stdlib.h>
#include <string.h>
-#if !defined(__linux__) && !defined(__OpenBSD__) && !(defined(__APPLE__) && __DARWIN_C_LEVEL >= 200809L)
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
+#if !defined(__linux__) && !defined(__OpenBSD__) && !(defined(__APPLE__) && __DARWIN_C_LEVEL >= 200809L) && !(defined(__FreeBSD__) && __FreeBSD_version >= 800000)
/*
* Emulate glibc getline() via BSD fgetln().
* Note that outsize is not changed unless memory is allocated.