[Ffmpeg-devel] libavformat/tcp.c compile on OS/X
Steven M. Schultz
sms
Sun May 8 07:37:12 CEST 2005
Hi -
Small problem (which I know was mentioned earlier) building
libavformat/tcp.c on a Powerbook recently updated to OS/X 10.4:
cc -O3 -g -Wall -Wno-switch -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare -faltivec -mdynamic-no-pic -I.. -I'/usr/local/src/ffmpeg' -I'/usr/local/src/ffmpeg'/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o tcp.o tcp.c
tcp.c:25: error: conflicting types for 'socklen_t'
/usr/include/sys/socket.h:99: error: previous declaration of 'socklen_t' was here
Since both OS/X 10.3 and 10.4 have socklen_t in <sys/socket.h> it is
a mystery why the 'defined(__APPLE__)' is needed.
I tested the attached patch on OS/X 10.3 and 10.4 and tcp.c
builds fine on both systems.
Cheers,
Steven Schultz
-------------- next part --------------
--- tcp.c.dist Sat Feb 26 16:16:10 2005
+++ tcp.c Sat May 7 22:31:23 2005
@@ -21,7 +21,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
-#if defined(__APPLE__) || defined(__BEOS__)
+#if defined(__BEOS__)
typedef int socklen_t;
#endif
#ifndef __BEOS__
More information about the ffmpeg-devel
mailing list