[FFmpeg-devel] error: redefinition of `struct sockaddr_storage'

Måns Rullgård mans
Tue Jan 19 14:57:55 CET 2010

Jan Stary <hans at stare.cz> writes:

> With current svn, I can configure but not build on OpenBSD 4.6:
> $ env CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib'
>   ./configure --enable-gpl --disable-ffserver --enable-nonfree
>   --enable-libfaad --enable-libfaac --enable-libgsm --enable-libmp3lame
>   --enable-libspeex --enable-libtheora  --enable-libvorbis
> $ gmake
> [...]
> gcc -DHAVE_AV_CONFIG_H -I. -I"/home/hans/src/ffmpeg" -I/usr/local/include -D_ISO C99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -std=c99 -fomit-frame-pointer -fPIC -g -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual -Wwrite-strings -Wundef -O3 -fno-math-errno       -MMD -MF libavformat/os_support.d -MT libavformat/os_support.o -c -o libavformat/os_support.o libavformat/os_support.c
> In file included from libavformat/os_support.c:42:
> libavformat/network.h:72: error: redefinition of `struct sockaddr_storage'
> gmake: *** [libavformat/os_support.o] Error 1
> I don't know the codebase enough and can only guess what
> 'os_support.o' is support to do, but changing the relevant
> source lines from

OpenBSD headers are broken.  Its sys/socket.h seems to require the
user to #include <sys/types.h> first.  According to the POSIX spec,
sys/socket.h shall have no such prerequisites.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list