patches/binutils/2.11.2/gcc-pr3106.patch
changeset 1 eeea35fbf182
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.11.2/gcc-pr3106.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,28 @@
     1.4 +See http://gcc.gnu.org/PR3106
     1.5 +Backported from gcc-3.0.x
     1.6 +
     1.7 +Fixes error
     1.8 +  .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
     1.9 +  /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
    1.10 +  make[1]: *** [strerror.o] Error 1
    1.11 +  make: *** [all-libiberty] Error 2
    1.12 +on Mac OS X.
    1.13 +
    1.14 +--- binutils-2.11.2/libiberty/strerror.c.old	2004-03-24 16:23:19.000000000 -0800
    1.15 ++++ binutils-2.11.2/libiberty/strerror.c	2004-03-24 16:23:48.000000000 -0800
    1.16 +@@ -13,6 +13,7 @@
    1.17 +    incompatible with our later declaration, perhaps by using const
    1.18 +    attributes.  So we hide the declaration in errno.h (if any) using a
    1.19 +    macro. */
    1.20 ++#define sys_nerr sys_nerr__
    1.21 + #define sys_errlist sys_errlist__
    1.22 + #endif
    1.23 + 
    1.24 +@@ -20,6 +21,7 @@
    1.25 + #include <errno.h>
    1.26 + 
    1.27 + #ifdef HAVE_SYS_ERRLIST
    1.28 ++#undef sys_nerr
    1.29 + #undef sys_errlist
    1.30 + #endif
    1.31 +