aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2021-11-12 23:38:59 -0800
committerTom Stellard <tstellar@redhat.com>2021-12-20 22:04:17 -0800
commitbdd28a2a138f0a6db356233a6fe65f49e0016769 (patch)
treea5484be5e3d57415c56dd626198f49f138f25ed7
parent2c6c3e4b713b05f249d75c3345785b6dad11c970 (diff)
downloadllvm-bdd28a2a138f0a6db356233a6fe65f49e0016769.zip
llvm-bdd28a2a138f0a6db356233a6fe65f49e0016769.tar.gz
llvm-bdd28a2a138f0a6db356233a6fe65f49e0016769.tar.bz2
[sanitizer] Don't test __pthread_mutex_lock with GLIBC 2.34
(cherry picked from commit e60b3fcefa62311a93a9f7c8589a1da5f25b1ba9)
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
index 6109581..fee8866 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
@@ -4,7 +4,12 @@
#include <pthread.h>
-#ifdef USE_GLIBC
+#if !defined(__GLIBC_PREREQ)
+#define __GLIBC_PREREQ(a, b) 0
+#endif
+
+#if defined(USE_GLIBC) && !__GLIBC_PREREQ(2, 34)
+// They were removed from GLIBC 2.34
extern "C" int __pthread_mutex_lock(pthread_mutex_t *__mutex);
extern "C" int __pthread_mutex_unlock(pthread_mutex_t *__mutex);
#define LOCK __pthread_mutex_lock