提交 170e2fd7 编写于 作者: M Michael Niedermayer

configure: Check if "-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600" is needed for localtime_r()

Fixes build with musl
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 3bc03617
......@@ -4234,6 +4234,15 @@ probe_libc(){
eval ${pfx}libc_type=solaris
add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
fi
check_${pfx}cc <<EOF
#include <time.h>
void *v = localtime_r;
EOF
test "$?" != 0 && check_${pfx}cc -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 <<EOF && add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
#include <time.h>
void *v = localtime_r;
EOF
}
probe_libc
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册