summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/closures.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index a10473d..d155a6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,7 +197,7 @@ case "$target" in
[Cannot use PROT_EXEC on this target, so, we revert to
alternative means])
;;
- *-apple-* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
+ *-apple-* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android*)
AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
[Cannot use malloc on this target, so, we revert to
alternative means])
diff --git a/src/closures.c b/src/closures.c
index f7eb464..abbba7c 100644
--- a/src/closures.c
+++ b/src/closures.c
@@ -55,7 +55,7 @@
#endif
#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX
-# ifdef __linux__
+# if defined(__linux__) && !defined(__ANDROID__)
/* When defined to 1 check for SELinux and if SELinux is active,
don't attempt PROT_EXEC|PROT_WRITE mapping at all, as that
might cause audit messages. */