[FFmpeg-devel] [PATCH] define _DARWIN_C_SOURCE for MAP_ANON

Ramiro Polla ramiro.polla
Wed Jul 21 15:31:59 CEST 2010


2010/7/21 M?ns Rullg?rd <mans at mansr.com>:
> Ramiro Polla <ramiro.polla at gmail.com> writes:
>> swscale-test crashes on macosx/64-bit because MAP_ANON is under
>> (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE), which makes swscale use plain
>> old malloc() to allocate memory for the mmx2 scaler, which ends up
>> crashing (it doesn't crash on 32-bit though).
>>
>> Attached patch adds the define for darwin.
>>
>> Index: libswscale/utils.c
>> ===================================================================
>> --- libswscale/utils.c ? ? ? ?(revision 31758)
>> +++ libswscale/utils.c ? ? ? ?(working copy)
>> @@ -19,6 +19,7 @@
>> ? */
>>
>> ?#define _SVID_SOURCE //needed for MAP_ANONYMOUS
>> +#define _DARWIN_C_SOURCE // needed for MAP_ANON
>
> Reluctantly OK with me.

Thanks, applied.

> BTW, the dyncode thing is missing a cache sync operation.

Could you please elaborate on this?



More information about the ffmpeg-devel mailing list