Fix build failure when using clang for Android
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 10 Jul 2013 06:34:53 +0000 (15:34 +0900)
committerMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 10 Jul 2013 06:34:53 +0000 (15:34 +0900)
clang for Android generates __gnu_linux__ define, but gcc for Android doesn't.  So we should add check it for Android

src/closures.c

index 6298d6f0c4de8cb2fa23897949b1e63233597787..557c73654695f877ba3990638ddf94f695ab2356 100644 (file)
@@ -34,7 +34,7 @@
 #include <ffi_common.h>
 
 #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
-# if __gnu_linux__
+# if __gnu_linux__ && !defined(__ANDROID__)
 /* This macro indicates it may be forbidden to map anonymous memory
    with both write and execute permission.  Code compiled when this
    option is defined will attempt to map such pages once, but if it