[FFmpeg-devel] [PATCH] fix implicit function declarations without _XOPEN_SOURCE

Måns Rullgård mans
Mon Aug 25 16:58:36 CEST 2008

"Adrian Stutz" <adrian at sttz.ch> writes:

> Hi,
> This patch broke compiling on OSX 10.5 against the 10.4 SDK.
> The problem seems to be that _XOPEN_SOURCE forces _DARWIN_UNIX03. OSX
> Leopard introduced full UNIX 03 compatibility and postfixed all relevant
> symbols with $UNIX2003. To compile with backward compatibility,
> mmacosx-version-min has to be set to compile against the old not-suffixed
> symbols.
> _XOPEN_SOURCE is set in libavcodec/utils.c and forces it to compile against
> the UNIX03 symbols. This causes a undefined symbol error when trying to link
> libavcodec:
>> 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 again.

strtod() is defined by C99, has been in POSIX since Issue 1, and was
included in SVID prior to that.  Sounds to me like osx has some
catching up to do.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list