[FFmpeg-devel] [PATCH][RFC] -std=c99
Måns Rullgård
mans
Tue Aug 19 02:38:14 CEST 2008
sean darcy <seandarcy2 at gmail.com> writes:
> Ivan Kalvachev wrote:
>> Problems. It may not be directly related...
>>
>> Two users on irc, both using archlinux with gcc-4.3 and glibc 2.8 are having same problem compiling libavformat/udp.c . Reason:
>>
>> /usr/include/netinet/in.h:
>> ...
>> #if defined __USE_MISC || defined __USE_GNU
>> /* IPv4 multicast request. */
>> struct ip_mreq
>> ...
>>
>> I said it may not be related because users doesn't report any success with removing -std or using -std=gnu99
>
> On Fedora 9, gcc-4.3, glibc-2.8, same problem. This patch ( from Chris
> Hills ) fixes it for me:
>
> ===================================================================
> --- configure (revision 14800)
> +++ configure (working copy)
> @@ -1852,6 +1852,9 @@
> check_cflags -Wwrite-strings
> check_cflags -Wtype-limits
> enabled extra_warnings && check_cflags -Winline
> +check_cflags -std=c99
> +check_cflags -fasm
> +check_cflags -D_BSD_SOURCE
>
> # add some linker flags
> check_ldflags -Wl,--warn-common
Rejected.
> 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. Does anyone know a standardised
way of doing whatever this code does?
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list