Dan Albert | 287553d | 2017-02-16 10:47:51 -0800 | [diff] [blame] | 1 | From c0265ead0f124c54b71f6d03491573a42accae09 Mon Sep 17 00:00:00 2001 |
| 2 | From: David 'Digit' Turner <digit@google.com> |
| 3 | Date: Thu, 25 Apr 2013 23:06:50 +0200 |
| 4 | Subject: Allow clone() usage on MIPS |
| 5 | |
| 6 | GoogleTest assumes that clone() is only available on ARM, but |
| 7 | this is only because the NDK headers were incorrect, and only |
| 8 | fixed recently. |
| 9 | |
| 10 | Note that clone() is sadly _not_ available on x86 at this point |
| 11 | though. |
| 12 | --- |
| 13 | include/gtest/internal/gtest-port.h | 5 +++-- |
| 14 | 1 file changed, 3 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h |
| 17 | index dc4fe0c..0011186 100644 |
| 18 | --- a/include/gtest/internal/gtest-port.h |
| 19 | +++ b/include/gtest/internal/gtest-port.h |
| 20 | @@ -611,8 +611,9 @@ using ::std::tuple_size; |
| 21 | |
| 22 | # if GTEST_OS_LINUX && !defined(__ia64__) |
| 23 | # if GTEST_OS_LINUX_ANDROID |
| 24 | -// On Android, clone() is only available on ARM starting with Gingerbread. |
| 25 | -# if defined(__arm__) && __ANDROID_API__ >= 9 |
| 26 | +// On Android, clone() is only available starting with Gingerbread, except |
| 27 | +// on x86, for some reason. |
| 28 | +# if !defined(__i386__) && __ANDROID_API__ >= 9 |
| 29 | # define GTEST_HAS_CLONE 1 |
| 30 | # else |
| 31 | # define GTEST_HAS_CLONE 0 |
| 32 | -- |
| 33 | 1.7.12.146.g16d26b1 |
| 34 | |