diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2015-05-08 12:09:26 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2015-05-08 12:09:26 +0000 |
commit | c1a8ff39fc9dc66db7cde605baa2326744ca8e8c (patch) | |
tree | 99031c1d439b491d132a381a31c6f95ad2654302 /tools/include/getline.h | |
parent | 4a3850b397295886a342af0dd1aa9e0e72ff0180 (diff) | |
download | upstream-c1a8ff39fc9dc66db7cde605baa2326744ca8e8c.tar.gz upstream-c1a8ff39fc9dc66db7cde605baa2326744ca8e8c.tar.bz2 upstream-c1a8ff39fc9dc66db7cde605baa2326744ca8e8c.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>
SVN-Revision: 45628
Diffstat (limited to 'tools/include/getline.h')
-rw-r--r-- | tools/include/getline.h | 6 |
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. |