[sanitizer] Define SANITIZER_USE_GETAUXVAL for Android
Summary:
Android for API level >= 21 has `getauxval`. Enable `SANITIZER_USE_GETAUXVAL`
when those requirements are met. Correct a typo in the header.
Reviewers: alekseyshl
Subscribers: srhines, llvm-commits, kubamracek
//===----------------------------------------------------------------------===//
//
// Common getauxval() guards and definitions.
-// getauxval() is not defined until glbc version 2.16.
+// getauxval() is not defined until glibc version 2.16, or until API level 21
+// for Android.
//
//===----------------------------------------------------------------------===//
#define __GLIBC_PREREQ(x, y) 0
#endif
-#if __GLIBC_PREREQ(2, 16)
+#if __GLIBC_PREREQ(2, 16) || (SANITIZER_ANDROID && __ANDROID_API__ >= 21)
# define SANITIZER_USE_GETAUXVAL 1
#else
# define SANITIZER_USE_GETAUXVAL 0
