From e40ae2e3a2e232eea8fd73e72033168e1511d85e Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 28 Jun 2018 22:54:42 +0000 Subject: [PATCH] [asan] Fix one more test on Android. This change makes it pass both on libstdc++ and libc++-based toolchains. The error was: error: function-like macro '__GLIBC_PREREQ' is not defined ^ llvm-svn: 335936 --- .../TestCases/Linux/sysconf_interceptor_bypass_test.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc b/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc index c3a656022897..0ffb346ebb45 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc @@ -1,12 +1,14 @@ // RUN: %clangxx -O2 %s -o %t && %run %t 2>&1 | FileCheck %s -// XFAIL: android - #include +#if !defined(__GLIBC_PREREQ) +#define __GLIBC_PREREQ(a, b) 0 +#endif + // getauxval() used instead of sysconf() in GetPageSize() is defined starting // glbc version 2.16. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 16) +#if __GLIBC_PREREQ(2, 16) extern "C" long sysconf(int name) { fprintf(stderr, "sysconf wrapper called\n"); return 0;