darwin: allow 64-bit darwin to allocate executable memory

darwin requires _DARWIN_C_SOURCE to be defined for MAP_ANON, which is used by
swscale to determine whether to use malloc() or mmap(). 64-bit darwin does not
have an executable heap, so mmap() must be used instead of malloc(), and
therefore _DARWIN_C_SOURCE must be defined.

Originally committed as revision 31760 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
Ramiro Polla 2010-07-21 13:29:55 +00:00
parent 3fc548df28
commit 262b6dbad9
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@
*/ */
#define _SVID_SOURCE //needed for MAP_ANONYMOUS #define _SVID_SOURCE //needed for MAP_ANONYMOUS
#define _DARWIN_C_SOURCE // needed for MAP_ANON
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>