From 9554b320f43eae57037ea27c334446e6c99481c5 Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Mon, 26 Sep 2016 09:31:48 -0700 Subject: [GCC 4.9] Fix posix_memalign declaration. Remove the 'throw()' from posix_memalign declaration if __GLIBC__ is not defined, so that it matches declaration in bionic's stdlib.h (avoid conflicting decl error). Can't remove 'throw ()' altogether, because it IS in glibc's stdlib.h, which this has to match in ChromeOS. BUG=b:31366027 TEST=successfully built ChromeOS for x86, x86_64, arm, arm64 and ran HWTests on all; successfully built chromiumos-sdk. Built Android platform & kernel. Successfully ran NDK checkbuild.py script. Change-Id: I0a8b4daf5d10f56f7a318738a0946e4ad5b7dd90 --- gcc-4.9/gcc/config/i386/pmm_malloc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc-4.9/gcc/config/i386/pmm_malloc.h') diff --git a/gcc-4.9/gcc/config/i386/pmm_malloc.h b/gcc-4.9/gcc/config/i386/pmm_malloc.h index 67b88a857..4506dbc9a 100644 --- a/gcc-4.9/gcc/config/i386/pmm_malloc.h +++ b/gcc-4.9/gcc/config/i386/pmm_malloc.h @@ -32,9 +32,13 @@ #ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); #else +#ifdef __GLIBC__ extern "C" int posix_memalign (void **, size_t, size_t) throw (); -#endif -#endif +#else +extern "C" int posix_memalign (void **, size_t, size_t); +#endif /* __GLIBC__ */ +#endif /* __cplusplus */ +#endif /* !(__ANDROID__) || (HAVE_POSIX_MEMALIGN) */ static __inline void * _mm_malloc (size_t size, size_t alignment) -- cgit v1.2.3