From d265046dcc4e081bd5fc9e6eb3f38c42ab07920e Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Thu, 4 Aug 2011 14:07:00 +0200 Subject: [PATCH] libc: x86: Fixed size_t definition. This patch changes the declaration of size_t on x86 targets to test for the __ANDROID__ macro, instead of ANDROID __ANDROID__ should be a builting toolchain macro, while ANDROID is usually added manually during the build. Testing against __ANDROID__ allows us to use the header when using the NDK's standalone x86 toolchain. This is related to http://code.google.com/p/android/issues/detail?id=19011 The bug was already fixed in the NDK platform headers, this simply updates the C library one accordingly. Change-Id: Ie038c4c8b37b7d24e2e4ae4d7a63371b69c9a51e --- libc/arch-x86/include/machine/_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/arch-x86/include/machine/_types.h b/libc/arch-x86/include/machine/_types.h index e9280a5da..5e28c6408 100644 --- a/libc/arch-x86/include/machine/_types.h +++ b/libc/arch-x86/include/machine/_types.h @@ -38,7 +38,7 @@ /* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */ #ifndef _SIZE_T_DEFINED_ # define _SIZE_T_DEFINED_ -# ifdef ANDROID +# ifdef __ANDROID__ typedef unsigned int size_t; # else typedef unsigned long size_t;