Re: [libav-devel] [RFC][PATCH] lavf: Wrap _DEFAULT_SOURCE symbols
On 24/09/2017 10:15, Diego Biurrun wrote: I'm not entirely confident that this is the right fallback. Maybe Luca can enlighten us as to why (musl?) he made that change in the first place. If we want to keep it, then Vittorio should add detection for MacOS libc and add no preprocessor flags in that case. musl does not have a mean to be probed on purpose and it needs -D_DEFAULT_SOURCE to enable the same stuff we enable for the other platforms. We could just enable it for glibc as well and drop it in the two places you added. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [RFC][PATCH] lavf: Wrap _DEFAULT_SOURCE symbols
On Thu, Sep 21, 2017 at 07:09:04PM +0200, Vittorio Giovara wrote: > On Thu, Sep 21, 2017 at 6:35 PM, Diego Biurrunwrote: > > On Thu, Sep 21, 2017 at 01:44:44PM +0200, Vittorio Giovara wrote: > > > Silence warnings such as: > > > > > > libavformat/udp.c:27:9: warning: '_DEFAULT_SOURCE' > > >macro redefined [-Wmacro-redefined] > > > #define _DEFAULT_SOURCE > > > ^ > > > :4:9: note: previous definition is here > > > #define _DEFAULT_SOURCE 1 > > > ^ > > > --- > > > I'm not sure this is the right approach, since configure explicitly adds > > > add_${pfx}cppflags -D_DEFAULT_SOURCE > > > in my compiler flag... > > > Any better ideas? > > > > And why would it do that? What is your libc? > > It's the latest clang toolchain available on macOS > > Apple LLVM version 9.0.0 (clang-900.0.37) > Target: x86_64-apple-darwin16.7.0 The issue is that there is no special support for the MacOS libc and the detection falls through to the default entry at the bottom. That entry was made to add -D_DEFAULT_SOURCE in 551746680462538bb5ad7adf55fb1248190428ec by Luca some years ago. In the previous commit the fallback was "-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600", before that nothing. I'm not entirely confident that this is the right fallback. Maybe Luca can enlighten us as to why (musl?) he made that change in the first place. If we want to keep it, then Vittorio should add detection for MacOS libc and add no preprocessor flags in that case. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [RFC][PATCH] lavf: Wrap _DEFAULT_SOURCE symbols
On Thu, Sep 21, 2017 at 6:35 PM, Diego Biurrunwrote: > On Thu, Sep 21, 2017 at 01:44:44PM +0200, Vittorio Giovara wrote: > > Silence warnings such as: > > > > libavformat/udp.c:27:9: warning: '_DEFAULT_SOURCE' > >macro redefined [-Wmacro-redefined] > > #define _DEFAULT_SOURCE > > ^ > > :4:9: note: previous definition is here > > #define _DEFAULT_SOURCE 1 > > ^ > > --- > > I'm not sure this is the right approach, since configure explicitly adds > > add_${pfx}cppflags -D_DEFAULT_SOURCE > > in my compiler flag... > > Any better ideas? > > And why would it do that? What is your libc? > It's the latest clang toolchain available on macOS Apple LLVM version 9.0.0 (clang-900.0.37) Target: x86_64-apple-darwin16.7.0 -- Vittorio ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [RFC][PATCH] lavf: Wrap _DEFAULT_SOURCE symbols
On Thu, Sep 21, 2017 at 01:44:44PM +0200, Vittorio Giovara wrote: > Silence warnings such as: > > libavformat/udp.c:27:9: warning: '_DEFAULT_SOURCE' >macro redefined [-Wmacro-redefined] > #define _DEFAULT_SOURCE > ^ > :4:9: note: previous definition is here > #define _DEFAULT_SOURCE 1 > ^ > --- > I'm not sure this is the right approach, since configure explicitly adds > add_${pfx}cppflags -D_DEFAULT_SOURCE > in my compiler flag... > Any better ideas? And why would it do that? What is your libc? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel