From: Udo L. <udo...@al...> - 2011-08-26 07:40:52
|
Hi, i just try to build a new build-system from scratch and get an error during "make prepare / gcc": In file included from ../../gcc-4.1.2/libiberty/floatformat.c:40: ../../gcc-4.1.2/libiberty/../include/libiberty.h:526: error: expected declaration specifiers or '...' before numeric constant ../../gcc-4.1.2/libiberty/../include/libiberty.h:526: error: conflicting types for '__asprintf_chk' /usr/include/bits/stdio2.h:135: error: previous declaration of '__asprintf_chk' was here make[2]: *** [floatformat.o] Error 1 make[2]: Leaving directory `/build/tmp/gcc4-prepare/libiberty' make[1]: *** [all-libiberty] Error 2 make[1]: Leaving directory `/build/tmp/gcc4-prepare' make: *** [all] Error 2 This patch of /build/tmp/gcc-4.1.2/include/libiberty.h solved the issue (found at https://bugs.gentoo.org/attachment.cgi?id=161379&action=diff ) diff -U 3 libiberty.h.org libiberty.h --- libiberty.h.org 2005-09-26 22:55:10.000000000 +0200 +++ libiberty.h 2011-08-26 08:57:31.000000000 +0200 @@ -523,8 +523,12 @@ /* Like sprintf but provides a pointer to malloc'd storage, which must be freed by the caller. */ +/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ + +#ifndef asprintf extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; #endif +#endif #if !HAVE_DECL_VASPRINTF /* Like vsprintf but provides a pointer to malloc'd storage, which Perhaps it's help someone else. Udo |