From: Foolbar Date: Sun, 9 Jun 2024 16:44:18 +0000 (+0800) Subject: arm64: CPU feature detection for Android X-Git-Tag: nettle_3.10rc1~2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7e875de7c257cbc633295c8fb6e59462e25e57fe;p=thirdparty%2Fnettle.git arm64: CPU feature detection for Android getauxval() is available on Android since API 18. https://developer.android.com/ndk/guides/cpu-features#features_using_libcs_getauxval3 --- diff --git a/fat-arm64.c b/fat-arm64.c index 240302a6..45cce0cc 100644 --- a/fat-arm64.c +++ b/fat-arm64.c @@ -43,9 +43,14 @@ #if defined(__linux__) && defined(__GLIBC__) && defined(__GLIBC_PREREQ) # if __GLIBC_PREREQ(2, 16) # define USE_GETAUXVAL 1 -# include -# include # endif +#elif __ANDROID_API__ >= 18 +# define USE_GETAUXVAL 1 +#endif + +#if USE_GETAUXVAL +# include +# include #elif defined(__OpenBSD__) # include # include