Skip to content

Commit bdd28a2

Browse files
vitalybukatstellar
authored andcommitted
[sanitizer] Don't test __pthread_mutex_lock with GLIBC 2.34
(cherry picked from commit e60b3fc)
1 parent 2c6c3e4 commit bdd28a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
#include <pthread.h>
66

7-
#ifdef USE_GLIBC
7+
#if !defined(__GLIBC_PREREQ)
8+
#define __GLIBC_PREREQ(a, b) 0
9+
#endif
10+
11+
#if defined(USE_GLIBC) && !__GLIBC_PREREQ(2, 34)
12+
// They were removed from GLIBC 2.34
813
extern "C" int __pthread_mutex_lock(pthread_mutex_t *__mutex);
914
extern "C" int __pthread_mutex_unlock(pthread_mutex_t *__mutex);
1015
#define LOCK __pthread_mutex_lock

0 commit comments

Comments
 (0)