From bf64b1ccb636ef6155b4635900cc5c8e4021dc76 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 5 Aug 2011 16:52:46 +0000 Subject: [PATCH] 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 SVN-Revision: 27916 --- tools/include/getline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 #include #include #include +#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. -- 2.25.1