refactor in macro conditions for helper_getauxval to avoid unused function warning in android x86

This commit is contained in:
Alden Torres 2018-03-20 15:11:39 -04:00 committed by Arvid Norberg
parent 3efb81e50c
commit 4bfa920fe7
1 changed files with 4 additions and 3 deletions

View File

@ -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 <dlfcn.h>
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 <sys/auxv.h>
#define helper_getauxval getauxval
#endif
#endif // TORRENT_HAS_ARM && TORRENT_HAS_AUXV
namespace libtorrent { namespace aux {