summaryrefslogtreecommitdiff
path: root/experimental/mono/deadlock.patch
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-12-14 20:05:57 -0500
committerZach van Rijn <me@zv.io>2022-11-02 15:55:51 -0500
commit1cf17d808a2dac46ba1209fbd752bd08f0213de4 (patch)
treea302ab9e80c0360e8059958c702573f743cffaaa /experimental/mono/deadlock.patch
parentf501eba1775d96f4438e2086e4b66966f2ec06a8 (diff)
downloadpackages-mono.tar.gz
packages-mono.tar.bz2
packages-mono.tar.xz
packages-mono.zip
experimental/mono: new packagemono
Diffstat (limited to 'experimental/mono/deadlock.patch')
-rw-r--r--experimental/mono/deadlock.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/experimental/mono/deadlock.patch b/experimental/mono/deadlock.patch
new file mode 100644
index 000000000..1d5d5f4f3
--- /dev/null
+++ b/experimental/mono/deadlock.patch
@@ -0,0 +1,40 @@
+From 7ea76f5bead1d7c8f80e09232351f243e9ab981d Mon Sep 17 00:00:00 2001
+From: Rickard Lyrenius <rly@combination.se>
+Date: Fri, 5 Jun 2020 00:05:32 +0200
+Subject: [PATCH] Avoid setting PTHREAD_PRIO_INHERIT on Alpine, since this
+ causes deadlocks
+
+---
+ configure.ac | 5 +++++
+ mono/utils/mono-os-mutex.h | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6eb961f9dda0..ad29946527f1 100644
+--- a/configure.ac
++++ b/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
+diff --git a/mono/utils/mono-os-mutex.h b/mono/utils/mono-os-mutex.h
+index 8b2f530f108e..904974b0a083 100644
+--- a/mono/utils/mono-os-mutex.h
++++ b/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))