diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2018-06-28 22:54:42 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2018-06-28 22:54:42 +0000 |
commit | d6bd232da4eb9a27bc133912a7e90bef75624fee (patch) | |
tree | c8488b570c209fc2cbbaf40807ead5e5590dac66 /test/sanitizer_common | |
parent | 8180617ba36963e3a9c55fba9bea9f11f699b61a (diff) |
[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
^
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@335936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/sanitizer_common')
-rw-r--r-- | test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc b/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc index c3a656022..0ffb346eb 100644 --- a/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc +++ b/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 <stdio.h> +#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; |