[FFmpeg-devel] [PATCH] UDP fixes join multicast group on Darwin arch
Måns Rullgård
mans
Mon Apr 20 11:12:06 CEST 2009
S?bastien Zwickert <szwickert at kezia.com> writes:
> On Apr 17, 2009, at 6:10 PM, Ronald S. Bultje wrote:
>
>> Hi,
>>
>> On Fri, Apr 17, 2009 at 10:25 AM, S?bastien Zwickert
>> <szwickert at kezia.com> wrote:
>>> I've read this archive
>>> http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-August/051136.html
>>> and
>>> i've added the _DARWIN_C_SOURCE definition at the top of the udp.c
>>> file.
>>
>> Putting it on the top of a random source file seems wrong, you likely
>> want to place a check in ./configure (check_cflags), preferrably in an
>> actual UDP test so it's only enabled when needed (OS X) and not for
>> others...
>
> New patch in attachment that applies changes to the configure file.
> I've added a test in the network check block to set -D_DARWIN_C_SOURCE
> cflag when the target_os is darwin.
>
>
> Index: configure
> ===================================================================
> --- configure (revision 18631)
> +++ configure (working copy)
> @@ -2121,6 +2121,10 @@
> check_type ws2tcpip.h socklen_t
> check_func_headers winsock2.h closesocket
> fi
> + # Needed for using struct ip_mreq with recent glibc on Darwin arch
> + if test $target_os = darwin; then
> + check_cflags -D_DARWIN_C_SOURCE
It should be safe to use add_cflags here. I don't see how -Dfoo could
fail.
> + fi
That's a tab.
> fi
This adds the flag for all files, which I'm not convinced is a good
idea either. You never know what that might do.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list