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

Patrice Bensoussan patrice.bensoussan
Sat Jul 11 19:55:55 CEST 2009


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?  
what's wrong with that?

http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html#tag_13_64

Patrice




More information about the ffmpeg-devel mailing list