[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
Wed Sep 24 05:31:37 CEST 2014


On Tue, Sep 23, 2014 at 12:42:54AM +0200, Michael Niedermayer wrote:
> 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; }

this solution has the problem that the flags are added after various
other availability checks have been done and they may be affected
by that
ill apply another but similar solution if that passes tests

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140924/b771b709/attachment.asc>


More information about the ffmpeg-devel mailing list