diff options
author | yunh <haihai107@126.com> | 2021-06-23 09:46:42 +0800 |
---|---|---|
committer | yunh <haihai107@126.com> | 2021-06-23 19:53:36 +0800 |
commit | b2dea4d5f22ec146373324c282fb1bcecd5a7d90 (patch) | |
tree | 8aa077816dab4428f6186c77bd72de101310375c /crypto | |
parent | 6e03ee56f4aec778a9d303f85c1d290a9e154aad (diff) |
enable getauxval on android 10
Fixes #9498
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15870)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/armcap.c | 6 | ||||
-rw-r--r-- | crypto/ppccap.c | 6 | ||||
-rw-r--r-- | crypto/uid.c | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/crypto/armcap.c b/crypto/armcap.c index 8bf96f1021..9e209f36aa 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -68,6 +68,12 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # include <sys/auxv.h> # define OSSL_IMPLEMENT_GETAUXVAL # endif +# elif defined(__ANDROID_API__) +/* see https://developer.android.google.cn/ndk/guides/cpu-features */ +# if __ANDROID_API__ >= 18 +# include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL +# endif # endif # if defined(__FreeBSD__) # include <sys/param.h> diff --git a/crypto/ppccap.c b/crypto/ppccap.c index e51156468a..eeaa47cc6b 100644 --- a/crypto/ppccap.c +++ b/crypto/ppccap.c @@ -211,6 +211,12 @@ size_t OPENSSL_instrument_bus2(unsigned int *out, size_t cnt, size_t max) # if __GLIBC_PREREQ(2, 16) # include <sys/auxv.h> # define OSSL_IMPLEMENT_GETAUXVAL +# elif defined(__ANDROID_API__) +/* see https://developer.android.google.cn/ndk/guides/cpu-features */ +# if __ANDROID_API__ >= 18 +# include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL +# endif # endif #endif diff --git a/crypto/uid.c b/crypto/uid.c index 65b1171039..aa076c263d 100644 --- a/crypto/uid.c +++ b/crypto/uid.c @@ -36,6 +36,12 @@ int OPENSSL_issetugid(void) # include <sys/auxv.h> # define OSSL_IMPLEMENT_GETAUXVAL # endif +# elif defined(__ANDROID_API__) +/* see https://developer.android.google.cn/ndk/guides/cpu-features */ +# if __ANDROID_API__ >= 18 +# include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL +# endif # endif int OPENSSL_issetugid(void) |