summaryrefslogtreecommitdiff
path: root/crypto/armcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/armcap.c')
-rw-r--r--crypto/armcap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/armcap.c b/crypto/armcap.c
index 43438e0aa4..93aeac85a3 100644
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -94,6 +94,15 @@ static unsigned long getauxval(unsigned long key)
# endif
/*
+ * Android: according to https://developer.android.com/ndk/guides/cpu-features,
+ * getauxval is supported starting with API level 18
+ */
+# if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ >= 18
+# include <sys/auxv.h>
+# define OSSL_IMPLEMENT_GETAUXVAL
+# endif
+
+/*
* ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas
* AArch64 used AT_HWCAP.
*/