[FFmpeg-devel] [PATCH] fix implicit function declarations without _XOPEN_SOURCE
Måns Rullgård
mans
Mon Aug 25 18:09:49 CEST 2008
Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> 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.
It's an Apple bug. Hence it should be fixed by Apple. If Apple
refuses, stop using Apple products, as then they are clearly not fit
for use.
>> 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.
No need. There's no way that code is going in, with such a check or
without.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list