[FFmpeg-devel] [PATCH] Fix compilation issue on Mac OS X with 10.3.9 SDK

Patrice Bensoussan patrice.bensoussan
Sat Jul 11 20:18:06 CEST 2009


On 11 Jul 2009, at 19:11, M?ns Rullg?rd wrote:

> 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.
>

OK... yes, it seems they fixed resource.h in 10.4 headers and above...  
but 10.3.9 is broken, hence the need to include sys/time.h

Patrice





More information about the ffmpeg-devel mailing list