[FFmpeg-devel] [PATCH 2/2] configure: Check that localtime_r() is in a header and if not retry with XOPEN/POSIX_SOURCE

Michael Niedermayer michaelni at gmx.at
Tue Sep 23 00:42:54 CEST 2014


This fixes the localtime_r() check, which was producing a false positive with musl
and also fixes build with musl

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 configure |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index f674a06..ad0a634 100755
--- a/configure
+++ b/configure
@@ -4677,7 +4677,8 @@ check_func  getopt
 check_func  getrusage
 check_func  gettimeofday
 check_func  isatty
-check_func  localtime_r
+check_func_headers time.h localtime_r || { check_func_headers time.h localtime_r -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 &&
+                                           add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600; }
 check_func  mach_absolute_time
 check_func  mkstemp
 check_func  mmap
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list