From 0a954f1a67410dceb0fafe202bd6c2f2f409cb4a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 12 Apr 2017 23:55:29 +0100 Subject: [PATCH] Fix Android recognition The official macro is __ANDROID__; ANDROID may or may not be defined. --- libraries/liblmdb/mdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 983860f..3b2745f 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -144,7 +144,7 @@ typedef SSIZE_T ssize_t; #include #endif -#if defined(__sun) || defined(ANDROID) +#if defined(__sun) || defined(__ANDROID__) /* Most platforms have posix_memalign, older may only have memalign */ #define HAVE_MEMALIGN 1 #include @@ -164,7 +164,7 @@ typedef SSIZE_T ssize_t; # define MDB_USE_SYSV_SEM 1 # endif # define MDB_FDATASYNC fsync -#elif defined(ANDROID) +#elif defined(__ANDROID__) # define MDB_FDATASYNC fsync #endif @@ -310,7 +310,7 @@ union semun { */ #ifndef MDB_USE_ROBUST /* Android currently lacks Robust Mutex support. So does glibc < 2.4. */ -# if defined(MDB_USE_POSIX_MUTEX) && (defined(ANDROID) || \ +# if defined(MDB_USE_POSIX_MUTEX) && (defined(__ANDROID__) || \ (defined(__GLIBC__) && GLIBC_VER < 0x020004)) # define MDB_USE_ROBUST 0 # else