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

Reimar Döffinger Reimar.Doeffinger
Mon Aug 25 17:55:34 CEST 2008


On Mon, Aug 25, 2008 at 05:43:41PM +0200, Adrian Stutz wrote:
> The regular not-postfixed symbols are there, however. It's just that the
> compiler ignores that it's compiling for an older version whenever it
> encounters the _XOPEN_SOURCE flag.

Or in other words: Apple has messed up their toolchain. Again.
I do not mind what others do in this case, but I personally have lost
motivation to work around Apple-mess some time ago, though I think
it IMHO is a good idea to require a formal bug report with Apple to exist
before starting workarounds.

> To fix compiling on OSX for older versions, all _XOPEN_SOURCE definitions
> should check for __APPLE__ first.
> 
> #if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__)
> # define _XOPEN_SOURCE 500
> #endif

I'd suggest adding "&& ..._VERSION_MAJOR < .." to ensure it will not
stay around forever.




More information about the ffmpeg-devel mailing list