[compiler-rt] r335936 - [asan] Fix one more test on Android.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 28 15:54:42 PDT 2018


Author: eugenis
Date: Thu Jun 28 15:54:42 2018
New Revision: 335936

URL: http://llvm.org/viewvc/llvm-project?rev=335936&view=rev
Log:
[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
                               ^

Modified:
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc

Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc?rev=335936&r1=335935&r2=335936&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc Thu Jun 28 15:54:42 2018
@@ -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;




More information about the llvm-commits mailing list