aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-09-26 16:31:48 (GMT)
committerCaroline Tice <cmtice@google.com>2016-10-04 20:02:43 (GMT)
commit9554b320f43eae57037ea27c334446e6c99481c5 (patch)
treeaa102811fb362dbb99b7a69e9d1ae7dd257d9cd0
parent535de7eb0179bdcd01fcd99f1dad6208250d3706 (diff)
downloadtoolchain_gcc-9554b320f43eae57037ea27c334446e6c99481c5.zip
toolchain_gcc-9554b320f43eae57037ea27c334446e6c99481c5.tar.gz
toolchain_gcc-9554b320f43eae57037ea27c334446e6c99481c5.tar.bz2
[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
-rw-r--r--gcc-4.9/gcc/config/i386/pmm_malloc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/config/i386/pmm_malloc.h b/gcc-4.9/gcc/config/i386/pmm_malloc.h
index 67b88a8..4506dbc 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)