[backfire] mkimage: backport Darwin 10.7 fix from r27917
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 1 Feb 2012 21:17:54 +0000 (21:17 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 1 Feb 2012 21:17:54 +0000 (21:17 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@29984 3c298f89-4303-0410-b956-a3cf2f4a3e73

tools/mkimage/patches/100-portability.patch

index ae38ad68eaec06f618dc24153dbc815d1de2efb9..9f2c0bbd1649ae79bde786b20d073c805142ac36 100644 (file)
@@ -1,10 +1,11 @@
 --- a/tools/kwbimage.c
 +++ b/tools/kwbimage.c
-@@ -206,6 +206,28 @@ INVL_DATA:
+@@ -206,6 +206,30 @@ INVL_DATA:
        exit (EXIT_FAILURE);
  }
  
 +#ifndef __GLIBC__
++#if !defined(__APPLE__) || __DARWIN_C_LEVEL < 200809L
 +static ssize_t
 +getline(char **line, size_t *len, FILE *fd)
 +{
@@ -25,6 +26,7 @@
 +      return tmplen;
 +}
 +#endif
++#endif
 +
  /*
   * this function sets the kwbimage header by-