This is intended to support nb-qemu (QEMU-based native bridge for
Android-x86).
"-Wno-pointer-arith",
"-Wno-sign-compare",
"-Wno-unused-parameter",
+ "-Wno-null-pointer-arithmetic",
],
local_include_dirs: ["include"],
generated_headers: ["ffi_header"],
export_generated_headers: ["ffi_header"],
srcs: [
+ "src/closures.c",
"src/debug.c",
"src/java_raw_api.c",
"src/prep_cif.c",
/* Define this if you want extra debugging. */
#undef FFI_DEBUG
+/* Cannot use malloc on this target, so, we revert to alternative means */
+#define FFI_MMAP_EXEC_WRIT 1
+
/* Define this is you do not want support for the raw API. */
#undef FFI_NO_RAW_API
#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. */