summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-11-01 13:32:25 (GMT)
committerDan Albert <danalbert@google.com>2016-11-01 13:37:49 (GMT)
commit4eafafbde585418303229607227055106a86f507 (patch)
treef6c5685581c158aeaad471bc255e34ebb4d934fd
parentff07a5de0e81580547f1685e101194ed1a4fcd56 (diff)
downloadgoogletest-4eafafbde585418303229607227055106a86f507.zip
googletest-4eafafbde585418303229607227055106a86f507.tar.gz
googletest-4eafafbde585418303229607227055106a86f507.tar.bz2
Fix detection of GTEST_HAS_CLONE for Android.refs/pull/918/head
This was not in Gingerbread for anything but ARM (even though the libs were hacked to lie about it being available in gingerbread).
-rw-r--r--googletest/include/gtest/internal/gtest-port.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 7d6e465..a807875 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -754,8 +754,12 @@ using ::std::tuple_size;
# if GTEST_OS_LINUX && !defined(__ia64__)
# if GTEST_OS_LINUX_ANDROID
-// On Android, clone() is only available on ARM starting with Gingerbread.
-# if defined(__arm__) && __ANDROID_API__ >= 9
+// On Android, clone() became available at different API levels for each 32-bit
+// architecture.
+# if defined(__LP64__) || \
+ (defined(__arm__) && __ANDROID_API__ >= 9) || \
+ (defined(__mips__) && __ANDROID_API__ >= 12) || \
+ (defined(__i386__) && __ANDROID_API__ >= 17)
# define GTEST_HAS_CLONE 1
# else
# define GTEST_HAS_CLONE 0