[FFmpeg-devel] [PATCH] Fix compilation issue on Mac OS X with 10.3.9 SDK
Måns Rullgård
mans
Sat Jul 11 20:11:51 CEST 2009
Patrice Bensoussan <patrice.bensoussan at free.fr> writes:
> On 11 Jul 2009, at 18:35, M?ns Rullg?rd wrote:
>
>> Patrice Bensoussan <patrice.bensoussan at free.fr> writes:
>>
>>> Hello,
>>>
>>> Here is a patch to fix an issue when compiling with 10.3.9 SDK on Mac
>>> OS X for ppc. Basically, sys/resource.h is using struct timeval which
>>> is actually defined in sys/time.h
>>>
>>> Patrice
>>>
>>>
>>> Index: ffmpeg.c
>>> ===================================================================
>>> --- ffmpeg.c (revision 19400)
>>> +++ ffmpeg.c (working copy)
>>> @@ -43,6 +43,7 @@
>>>
>>> #if HAVE_SYS_RESOURCE_H
>>> #include <sys/types.h>
>>> +#include <sys/time.h>
>>> #include <sys/resource.h>
>>> #elif HAVE_GETPROCESSTIMES
>>> #include <windows.h>
>>
>> From the spec section on sys/resource.h:
>>
>> The timeval structure shall be defined as described in <sys/time.h>.
>>
>> Clearly, the macos headers are broken.
>>
>
> Not sure I am getting your point here... why are headers broken? It
> does state that the structure is defined in sys/time.h (as per open
> group spec). So we need to include sys/time.h to get the definition?
The spec says that including sys/resource.h must define struct timeval
as specified for sys/time.h, but it doesn't have to (although it may)
include all of sys/time.h. In summary, sys/resource.h must not
require any other headers to be functional.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list