Hi, compile on trunk currently dies here,
...
utils.c: In function 'fence_malloc':
utils.c:257: warning: implicit declaration of function 'mmap'
utils.c:257: error: 'MAP_PRIVATE' undeclared (first use in this function)
...
As we have sys/mman.h but no working mmap().
One possible fix is attached, perhaps the check for sys/mman.h should be
removed?
Dave
diff --git a/configure.ac b/configure.ac
index 9a8ebe9..2defbd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -650,6 +650,11 @@ fi
AC_CHECK_HEADER([sys/mman.h],
[AC_DEFINE(HAVE_SYS_MMAN_H, [1], [Define to 1 if we have <sys/mman.h>])])
+AC_CHECK_FUNC(mmap, have_mmap=yes, have_mmap=no)
+if test x$have_mmap = xyes; then
+ AC_DEFINE(HAVE_MMAP, 1, [Whether we have mmap()])
+fi
+
AC_CHECK_FUNC(mprotect, have_mprotect=yes, have_mprotect=no)
if test x$have_mprotect = xyes; then
AC_DEFINE(HAVE_MPROTECT, 1, [Whether we have mprotect()])
diff --git a/test/utils.c b/test/utils.c
index 56701c4..4025602 100644
--- a/test/utils.c
+++ b/test/utils.c
@@ -229,7 +229,7 @@ typedef struct
int n_bytes;
} info_t;
-#if defined(HAVE_MPROTECT) && defined(HAVE_GETPAGESIZE) && defined(HAVE_SYS_MMAN_H)
+#if defined(HAVE_MPROTECT) && defined(HAVE_GETPAGESIZE) && defined(HAVE_SYS_MMAN_H) && defined(HAVE_MMAP)
/* This is apparently necessary on at least OS X */
#ifndef MAP_ANONYMOUS
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman