Skip to content
Snippets Groups Projects
Commit 5916c9d5 authored by Steve Lhomme's avatar Steve Lhomme Committed by Thomas Guillem
Browse files

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


also fix stdlib.h include from C++

Signed-off-by: default avatarThomas Guillem <thomas@gllm.fr>
parent 945f34cd
No related branches found
No related tags found
No related merge requests found
......@@ -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 \
${NDK_TOOLCHAIN_DIR}/sysroot/usr/include
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"
"#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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment