History

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

Fixes build with musl

Michael Niedermayer committed 12 years ago

Commit 170e2fd1 parent 3bc03611 file · +9 −0Browse files

Unified · Split

configure+9−0
@@ -4234,6 +4234,15 @@ probe_libc(){ · 4233 unmodified lines
4234 eval ${pfx}libc_type=solaris4234 eval ${pfx}libc_type=solaris
4235 add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=6004235 add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
4236 fi4236 fi
4237 check_${pfx}cc <<EOF
4238#include <time.h>
4239void *v = localtime_r;
4240EOF
4241test "$?" != 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
4242#include <time.h>
4243void *v = localtime_r;
4244EOF
4245
4237}4246}
4238 4247
4239probe_libc4248probe_libc

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t