AC_FUNC_MMAP assumes that mmap(2) is not available when cross-compiling

except on GNU systems. Just check for function presence instead.
This commit is contained in:
Frank Denis 2014-11-24 10:34:42 -08:00
parent da2c9952db
commit b421610110

View File

@ -407,8 +407,7 @@ dnl Checks for functions and headers
AS_IF([test "x$EMSCRIPTEN" = "x"],[ AS_IF([test "x$EMSCRIPTEN" = "x"],[
AC_CHECK_FUNCS([arc4random arc4random_buf]) AC_CHECK_FUNCS([arc4random arc4random_buf])
AC_CHECK_FUNCS([mlock madvise mprotect explicit_bzero]) AC_CHECK_FUNCS([mmap mlock madvise mprotect explicit_bzero])
AC_FUNC_MMAP
]) ])
AC_CHECK_FUNCS([posix_memalign]) AC_CHECK_FUNCS([posix_memalign])