Commit 5916c9d5 authored by Steve Lhomme's avatar Steve Lhomme Committed by Thomas Guillem

create the ASAN stdblib.h in our contrib includes, not the toolchain

also fix stdlib.h include from C++
Signed-off-by: Thomas Guillem's avatarThomas Guillem <>
parent 945f34cd
......@@ -425,10 +425,18 @@ if [ "${ASAN}" = 1 ];then
VLC_LDFLAGS="${VLC_LDFLAGS} -ldl -fsanitize=address"
# ugly, sorry
if [ "${ANDROID_API}" = "9" ];then
cp ${ANDROID_NDK}/platforms/android-9/arch-${PLATFORM_SHORT_ARCH}/usr/include/stdlib.h \
echo "extern int posix_memalign(void **memptr, size_t alignment, size_t size);" \
>> ${NDK_TOOLCHAIN_DIR}/sysroot/usr/include/stdlib.h
if [ ! -f vlc/contrib/${TARGET_TUPLE}/include/stdlib.h ]; then
mkdir -p vlc/contrib/${TARGET_TUPLE}/include
printf "#include_next <stdlib.h>\n"
"#ifdef __cplusplus\n"
"extern \"C\" {\n"
"extern int posix_memalign(void **memptr, size_t alignment, size_t size);\n"
"#ifdef __cplusplus\n"
"#endif\n" \
> vlc/contrib/${TARGET_TUPLE}/include/stdlib.h
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment