[FFmpeg-devel] [PATCH][RFC] -std=c99

Luca Abeni lucabe72
Tue Aug 19 08:52:45 CEST 2008


Hi M?ns,

M?ns Rullg?rd wrote:
[...]
>> libavformat/udp.c: In function 'udp_join_multicast_group':
>> libavformat/udp.c:83: error: storage size of 'mreq' isn't known
>> libavformat/udp.c:83: warning: unused variable 'mreq'
>> libavformat/udp.c: In function 'udp_leave_multicast_group':
>> libavformat/udp.c:111: error: storage size of 'mreq' isn't known
> 
> The problem is that this struct is not defined by any standard, to the
> best of my knowledge and googling.

I do not know if it counts as a standard, but ip_mreq is defined in RFC 
3678. Such an RFC cites
	IEEE Std. 1003.1-2001 Standard for Information Technology --
         Portable Operating System Interface (POSIX).  Open Group
         Technical Standard: Base Specifications, Issue 6, December 2001.
         ISO/IEC 9945:2002.  http://www.opengroup.org/austin
as a standard (and as far as I understand, it seems to claim that the 
structure is defined there). But it seems that I have to register to 
download the standard, so I did not check it.

I tried to search on opengroup.org, and I found:
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_10.html#tag_02_10_19
" 2.10.19 Use of Sockets over Internet Protocols Based on IPv4

Support for sockets over Internet protocols based on IPv4 is mandatory."
but then multicast addresses are not described... Maybe they are 
described somewhere else?

The next section, talking about IPV6, is more detailed and describes all 
the IPV6 structures and macros that can be used to join IPV6 multicast 
groups.


>  Does anyone know a standardised way of doing whatever this code does?

I cannot speak about standards, but it seems to me that this is the same 
code used by all the other programs that need to join multicast groups 
and/or to receive/send multicast traffic.

I cannot reproduce the build failure here, but maybe the problem can be 
fixed by defining _BSD_SOURCE at the top of the file?



				Thanks,
					Luca




More information about the ffmpeg-devel mailing list