aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-08-05 16:52:46 +0000
committerLars-Peter Clausen <lars@metafoo.de>2011-08-05 16:52:46 +0000
commit24d7d4bd2472b6d5eb8d83e867b1c685912614d7 (patch)
tree4358118edd9a3629dd7260f7a02051d3213eb1c2 /tools/include
parent058345b92f2005703e43e735634f3c29fd5d1027 (diff)
downloadupstream-24d7d4bd2472b6d5eb8d83e867b1c685912614d7.tar.gz
upstream-24d7d4bd2472b6d5eb8d83e867b1c685912614d7.tar.bz2
upstream-24d7d4bd2472b6d5eb8d83e867b1c685912614d7.zip
[tools] host/include/getline.h - Mac OS X 10.7 (Lion) fix
Apple has finally updated their version of Libc, and it now includes getline(). \o/ The following patch fixes OpenWRT getline.h to not redefine it for 10.7. The one caveat is, the includes (at least stdio.h) are needed before the #ifdef so that __DARWIN_C_LEVEL could be properly defined (it is not a compiler built-in define like __linux__ or __APPLE__). This one fixes the host/include/getline.h. The next patch will mend the mkimage package. Signed-off-by: Joe Roback <openwrt-devel at roback.cc> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27916 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/getline.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/getline.h b/tools/include/getline.h
index b9a3f7150f..02df6c2f79 100644
--- a/tools/include/getline.h
+++ b/tools/include/getline.h
@@ -27,12 +27,12 @@
* SUCH DAMAGE.
*/
-#ifndef __linux__
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#if !defined(__linux__) && !(defined(__APPLE__) && __DARWIN_C_LEVEL >= 200809L)
/*
* Emulate glibc getline() via BSD fgetln().
* Note that outsize is not changed unless memory is allocated.