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

sean darcy seandarcy2
Tue Aug 19 01:54:27 CEST 2008

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


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

More information about the ffmpeg-devel mailing list