@@ -, +, @@ causes deadlocks (#19914) --- configure.ac | 5 +++++ mono/utils/mono-os-mutex.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) --- a/configure.ac +++ a/configure.ac @@ -320,6 +320,11 @@ case "$host" in # available during cross-compilation mono_cv_uscore=no fi + case "$host" in + *-musl) + AC_DEFINE(MUSL, 1, [musl libc]) + ;; + esac case "$host" in *-tizen-linux-*) platform_tizen=yes --- a/mono/utils/mono-os-mutex.h +++ a/mono/utils/mono-os-mutex.h @@ -59,7 +59,7 @@ mono_os_mutex_init_type (mono_mutex_t *mutex, int type) if (G_UNLIKELY (res != 0)) g_error ("%s: pthread_mutexattr_settype failed with \"%s\" (%d)", __func__, g_strerror (res), res); -#if !defined(__HAIKU__) && defined (PTHREAD_PRIO_INHERIT) && HAVE_DECL_PTHREAD_MUTEXATTR_SETPROTOCOL +#if !defined(__HAIKU__) && !defined(MUSL) && defined (PTHREAD_PRIO_INHERIT) && HAVE_DECL_PTHREAD_MUTEXATTR_SETPROTOCOL /* use PTHREAD_PRIO_INHERIT if possible */ res = pthread_mutexattr_setprotocol (&attr, PTHREAD_PRIO_INHERIT); if (G_UNLIKELY (res != 0 && res != ENOTSUP))