[FFmpeg-devel] [PATCH] UDP fixes join multicast group on Darwin arch

Diego Biurrun diego
Mon Apr 20 18:11:11 CEST 2009


On Fri, Apr 17, 2009 at 04:25:42PM +0200, S?bastien Zwickert wrote:
> 
> I found that udp_join_multicast_group() in libavformat/udp.c is broken  
> because IP_ADD_MEMBERSHIP and ip_mreq struct aren't defined on Darwin  
> Kernel Version 9.6.0 architecture.
> 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.

The problem is that this struct and definition are only defined when
_POSIX_C_SOURCE is not defined.  But we compile with _POSIX_C_SOURCE
set, so it fails.

I'm not sure if this is a bug in the Apple system headers or if we
should disable _POSIX_C_SOURCE on Darwin (probably not) or if we should
avoid that struct and that definition...

Diego



More information about the ffmpeg-devel mailing list