]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Fix Android recognition
authorHoward Chu <hyc@openldap.org>
Wed, 12 Apr 2017 22:55:29 +0000 (23:55 +0100)
committerHoward Chu <hyc@openldap.org>
Sat, 1 Jul 2017 20:59:44 +0000 (21:59 +0100)
The official macro is __ANDROID__; ANDROID may or may not be defined.

libraries/liblmdb/mdb.c

index 970e1ef28e5eed3cbc9f44810a35984c9e535101..a64f60a14019e64b92aa08b70d7f9d59933968a9 100644 (file)
@@ -138,7 +138,7 @@ typedef SSIZE_T     ssize_t;
 #include <unistd.h>
 #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 <malloc.h>
@@ -154,7 +154,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
 
@@ -300,7 +300,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