From: kaloz Date: Fri, 8 May 2015 12:09:26 +0000 (+0000) Subject: tools: host/include/getline.h: fix FreeBSD 8.0+ support X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=41d3787bfd0fee341c9fc5814aad169b8dbcc63d;p=openwrt.git tools: host/include/getline.h: fix FreeBSD 8.0+ support Signed-off-by: Jo-Philipp Wich Signed-off-by: Imre Kaloz git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45628 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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 #include -#if !defined(__linux__) && !defined(__OpenBSD__) && !(defined(__APPLE__) && __DARWIN_C_LEVEL >= 200809L) +#ifdef __FreeBSD__ +#include +#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.