diff options
Diffstat (limited to 'compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp')
-rw-r--r-- | compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp | 7 |
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 610958143b47..fee88666b2ec 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 |