Aaron Durbin (adurbin@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2932
-gerrit
commit bfec711adeee97b5c8b9fe15b15d2534bdcea8a6 Author: Aaron Durbin adurbin@chromium.org Date: Wed Mar 27 11:40:55 2013 -0500
libpayload: handle size_t compilation errors
__SIZE_TYPE__ is used by gcc in its stddef.h header to define the type of size_t through a typedef. In order to not conflict with the typedef for size_t honor __SIZE_TYPE__ when it is defined. libpayload is being compiled with the compiler's header files so one needs to handle its own types and defines.
Change-Id: Ie3b20f702700a9bb2e0b2464a1ad7280014a6714 Signed-off-by: Aaron Durbin adurbin@chromium.org --- payloads/libpayload/include/x86/arch/types.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/payloads/libpayload/include/x86/arch/types.h b/payloads/libpayload/include/x86/arch/types.h index bb40257..526c052 100644 --- a/payloads/libpayload/include/x86/arch/types.h +++ b/payloads/libpayload/include/x86/arch/types.h @@ -53,7 +53,13 @@ typedef signed long long s64; typedef long time_t; typedef long suseconds_t;
+/* Handle leaking the gcc stand headers. __SIZE_TYPE__ is used by gcc. If + * the gcc headers are being used make size_t the same as __SIZE_TYPE__. */ +#if defined (__SIZE_TYPE__) +typedef __SIZE_TYPE__ size_t; +#else typedef unsigned long size_t; +#endif typedef long ssize_t;
#ifndef NULL