[FFmpeg-devel] [PATCH] define _DARWIN_C_SOURCE for MAP_ANON
Wed Jul 21 08:50:31 CEST 2010
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.
BTW, the dyncode thing is missing a cache sync operation.
mans at mansr.com
More information about the ffmpeg-devel