From 4bfa920fe7e42e05d35bf3ecad948e28ea0017d2 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Tue, 20 Mar 2018 15:11:39 -0400 Subject: [PATCH] refactor in macro conditions for helper_getauxval to avoid unused function warning in android x86 --- src/cpuid.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cpuid.cpp b/src/cpuid.cpp index e5cf3b3a1..23071098e 100644 --- a/src/cpuid.cpp +++ b/src/cpuid.cpp @@ -54,8 +54,8 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_HAS_AUXV 0 #endif - -#if defined(TORRENT_ANDROID) && TORRENT_HAS_AUXV +#if TORRENT_HAS_ARM && TORRENT_HAS_AUXV +#if defined TORRENT_ANDROID #include namespace { unsigned long int helper_getauxval(unsigned long int type) @@ -67,10 +67,11 @@ unsigned long int helper_getauxval(unsigned long int type) return pf_getauxval(type); } } -#elif TORRENT_HAS_ARM && TORRENT_HAS_AUXV +#else // TORRENT_ANDROID #include #define helper_getauxval getauxval #endif +#endif // TORRENT_HAS_ARM && TORRENT_HAS_AUXV namespace libtorrent { namespace aux {