From f72bd7c7574fc8fdc1f495f3a50111329851edc5 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Thu, 26 Feb 2015 15:23:01 +0100 Subject: [PATCH] skip MAP_NORESERVE when unsupported Fixes a compilation on AIX ('MAP_NORESERVE' undeclared) Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89340 Signed-off-by: Bryce Harrington --- test/cairo-test-trace.c | 4 ++++ util/cairo-sphinx/sphinx.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/test/cairo-test-trace.c b/test/cairo-test-trace.c index 52d9dd97b..5badc4377 100644 --- a/test/cairo-test-trace.c +++ b/test/cairo-test-trace.c @@ -91,6 +91,10 @@ #include #endif +#ifndef MAP_NORESERVE +#define MAP_NORESERVE 0 +#endif + #define DEBUG 0 #define ignore_image_differences 0 /* XXX make me a cmdline option! */ diff --git a/util/cairo-sphinx/sphinx.c b/util/cairo-sphinx/sphinx.c index 3a6c04c35..238d40064 100644 --- a/util/cairo-sphinx/sphinx.c +++ b/util/cairo-sphinx/sphinx.c @@ -35,6 +35,10 @@ # error "cairo-sphinx needs real pthreads" #endif +#ifndef MAP_NORESERVE +#define MAP_NORESERVE 0 +#endif + #define DATA_SIZE (256 << 20) #define SHM_PATH_XXX "/shmem-cairo-sphinx"