summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>2015-02-26 15:23:01 +0100
committerBryce Harrington <b.harrington@samsung.com>2015-03-05 14:48:28 -0800
commitf72bd7c7574fc8fdc1f495f3a50111329851edc5 (patch)
tree7909541f159cd2d96df448397c946dfb3cb28d24
parentac75ab9f30ef10ee5973d42223f4b51acca93333 (diff)
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 <bryce@osg.samsung.com>
-rw-r--r--test/cairo-test-trace.c4
-rw-r--r--util/cairo-sphinx/sphinx.c4
2 files changed, 8 insertions, 0 deletions
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 <fontconfig/fontconfig.h>
#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"