Ignore:
Timestamp:
2011-08-05T18:52:46+02:00 (5 years ago)
Author:
lars
Message:

[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>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/include/getline.h

    r15227 r27916  
    2828 */ 
    2929 
    30 #ifndef __linux__ 
    3130#include <sys/types.h> 
    3231#include <stdio.h> 
     
    3433#include <string.h> 
    3534 
     35#if !defined(__linux__) && !(defined(__APPLE__) && __DARWIN_C_LEVEL >= 200809L) 
    3636/* 
    3737 * Emulate glibc getline() via BSD fgetln(). 
Note: See TracChangeset for help on using the changeset viewer.