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
42344234 eval ${pfx}libc_type=solaris
42354235 add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
42364236 fi
4237+ check_${pfx}cc <<EOF
4238+#include <time.h>
4239+void *v = localtime_r;
4240+EOF
4241+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
4242+#include <time.h>
4243+void *v = localtime_r;
4244+EOF
4245+
42374246 }
42384247
42394248 probe_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