File 0560-Fix-check-for-buggy-glibc-version.patch of Package erlang
From 306b6eb6aa06020577e9e09e611b99c0b3b62663 Mon Sep 17 00:00:00 2001 From: Kjell Winblad <kjellwinblad@gmail.com> Date: Fri, 18 Oct 2019 15:59:32 +0200 Subject: [PATCH] Fix check for buggy glibc version Previously, it was assumed that pthread_mutex_destroy() may return EBUSY when it shouldn't in glibc versions prior to 2.4 but it seems like glibc 2.4 has the same bug. This commit activates the workaround for this bug that was added previously when compiling with glibc 2.4. --- erts/emulator/beam/erl_threads.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erts/emulator/beam/erl_threads.h b/erts/emulator/beam/erl_threads.h index aedceb6fc2..e81f76d25b 100644 --- a/erts/emulator/beam/erl_threads.h +++ b/erts/emulator/beam/erl_threads.h @@ -250,10 +250,10 @@ #include "erl_lock_check.h" #include "erl_lock_count.h" -#if defined(__GLIBC__) && (__GLIBC__ << 16) + __GLIBC_MINOR__ < (2 << 16) + 4 +#if defined(__GLIBC__) && (__GLIBC__ << 16) + __GLIBC_MINOR__ < (2 << 16) + 5 /* * pthread_mutex_destroy() may return EBUSY when it shouldn't :( We have - * only seen this bug in glibc versions before 2.4. Note that condition + * only seen this bug in glibc versions before 2.5. Note that condition * variables, rwmutexes, spinlocks, and rwspinlocks also may be effected by * this bug since these implementations may use mutexes internally. */ -- 2.16.4