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 <thomas@gllm.fr>
parent 945f34cd
...@@ -425,10 +425,18 @@ if [ "${ASAN}" = 1 ];then ...@@ -425,10 +425,18 @@ if [ "${ASAN}" = 1 ];then
VLC_LDFLAGS="${VLC_LDFLAGS} -ldl -fsanitize=address" VLC_LDFLAGS="${VLC_LDFLAGS} -ldl -fsanitize=address"
# ugly, sorry # ugly, sorry
if [ "${ANDROID_API}" = "9" ];then if [ "${ANDROID_API}" = "9" ];then
cp ${ANDROID_NDK}/platforms/android-9/arch-${PLATFORM_SHORT_ARCH}/usr/include/stdlib.h \ if [ ! -f vlc/contrib/${TARGET_TUPLE}/include/stdlib.h ]; then
${NDK_TOOLCHAIN_DIR}/sysroot/usr/include mkdir -p vlc/contrib/${TARGET_TUPLE}/include
echo "extern int posix_memalign(void **memptr, size_t alignment, size_t size);" \ printf "#include_next <stdlib.h>\n"
>> ${NDK_TOOLCHAIN_DIR}/sysroot/usr/include/stdlib.h "#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n"
"extern int posix_memalign(void **memptr, size_t alignment, size_t size);\n"
"#ifdef __cplusplus\n"
"}\n"
"#endif\n" \
> vlc/contrib/${TARGET_TUPLE}/include/stdlib.h
fi
fi fi
fi fi
......
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