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

Jan Stary hans
Sun Jan 17 13:18:01 CET 2010


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

#if !HAVE_STRUCT_SOCKADDR_STORAGE
struct sockaddr_storage {
	struct sockaddr_in x;
};
#endif

to

#if 0
struct sockaddr_storage {
	struct sockaddr_in x;
};
#endif

enables me to compile allright.

	Jan





More information about the ffmpeg-devel mailing list