summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorJean Guyomarc'h <jeanguyomarch.github@gmail.com>2013-10-14 11:53:40 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-10-14 12:10:19 +0900
commitdd2f6b1370608941b7e61877de61c333371f6d15 (patch)
treef1ed5800b674d7a0d2ccf84144c57f648244187c /src/lib/evas/common
parentb1437273890058ce9e84f5efd3195f8834d0f9c0 (diff)
evas: fix build for Mac OS X.
Reviewers: cedric, michael.bouchaud CC: cedric Differential Revision: https://phab.enlightenment.org/D242 Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_image_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c
index 6ab9eb4c43..38aac783a9 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -148,6 +148,12 @@ _evas_common_rgba_image_surface_mmap(unsigned int w, unsigned int h, Eina_Bool a
148 if (siz < PAGE_SIZE) 148 if (siz < PAGE_SIZE)
149 return malloc(siz); 149 return malloc(siz);
150 150
151#if defined (__MacOSX__) || (defined (__MACH__) && defined (__APPLE__))
152# ifndef MAP_ANONYMOUS
153# define MAP_ANONYMOUS MAP_ANON
154# endif
155#endif
156
151 r = mmap(NULL, siz, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0); 157 r = mmap(NULL, siz, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
152 if (r == MAP_FAILED) 158 if (r == MAP_FAILED)
153 r = mmap(NULL, siz, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 159 r = mmap(NULL, siz, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);