[FFmpeg-devel] [PATCH] fix implicit function declarations without _XOPEN_SOURCE
Mon Aug 25 19:01:22 CEST 2008
On Aug 25, 2008, at 9:39 AM, "Adrian Stutz" <adrian at sttz.ch> wrote:
> This patch broke compiling on OSX 10.5 against the 10.4 SDK.
Works for me.
It sounds like you're using 10.5 headers. Make sure you're specifing
the sdk in cflags as well as ldflags. Otherwise make sure you have the
latest developer tools.
> The problem seems to be that _XOPEN_SOURCE forces _DARWIN_UNIX03. OSX
> Leopard introduced full UNIX 03 compatibility and postfixed all
> symbols with $UNIX2003. To compile with backward compatibility,
> mmacosx-version-min has to be set to compile against the old not-
> _XOPEN_SOURCE is set in libavcodec/utils.c and forces it to compile
> the UNIX03 symbols. This causes a undefined symbol error when trying
> to link
>> Undefined symbols:
>> "_strtod$UNIX2003", referenced from:
>> _av_parse_video_frame_rate in libavcodec.a(utils.o)
>> ld: symbol(s) not found
> Removing _XOPEN_SOURCE from utils.c makes libavcodec link correctly
> Or that's at least what I could gather. Here's some more information:
> On Wed, Aug 13, 2008 at 11:40:47PM +0200, Aurelien Jacobs wrote:
>> When compiling without _XOPEN_SOURCE defined globally, there are a
>> "implicit function declaration" warnings appearing. This might cause
>> serious trouble on 64 bits arch (segfault, etc...).
>> Attached patch adds a few define to some files, to ensure the
>> of the following functions are imported:
>> - usleep()
>> - mkstemp()
>> - gethostname()
>> - inet_aton()
>> With this patch applied, I think that global _XOPEN_SOURCE can
>> be dropped, without any kind of trouble.
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel