From 9c99c075a925519eb073744d9cbdaee596abb4ab Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb
Date: Wed, 2 Oct 2013 13:06:38 +0200
Subject: remove musl patch, breaks alsamixer on eglibc/glibc systems with
futex deadlock
---
package/alsa-lib/patches/patch-src_conf_c | 13 -------------
1 file changed, 13 deletions(-)
delete mode 100644 package/alsa-lib/patches/patch-src_conf_c
(limited to 'package/alsa-lib/patches/patch-src_conf_c')
diff --git a/package/alsa-lib/patches/patch-src_conf_c b/package/alsa-lib/patches/patch-src_conf_c
deleted file mode 100644
index a6f296614..000000000
--- a/package/alsa-lib/patches/patch-src_conf_c
+++ /dev/null
@@ -1,13 +0,0 @@
-* added idea/patch from https://github.com/rofl0r/sabotage
-
---- alsa-lib-1.0.27.2.orig/src/conf.c 2013-07-08 14:31:36.000000000 +0200
-+++ alsa-lib-1.0.27.2/src/conf.c 2013-09-17 18:30:14.000000000 +0200
-@@ -428,7 +428,7 @@ beginning:
-
- #ifdef HAVE_LIBPTHREAD
- static pthread_mutex_t snd_config_update_mutex =
-- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-+ {{{1,0,0,0,0,0,0,0,0,0}}};
- #endif
-
- struct _snd_config {
--
cgit v1.2.3
From bc3103c554eb186f9535bf6a123f551df6d46db0 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb
Date: Wed, 2 Oct 2013 14:54:44 +0200
Subject: add a better patch from alpinelinux
---
package/alsa-lib/patches/patch-src_conf_c | 35 +++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 package/alsa-lib/patches/patch-src_conf_c
(limited to 'package/alsa-lib/patches/patch-src_conf_c')
diff --git a/package/alsa-lib/patches/patch-src_conf_c b/package/alsa-lib/patches/patch-src_conf_c
new file mode 100644
index 000000000..f3c1e70bd
--- /dev/null
+++ b/package/alsa-lib/patches/patch-src_conf_c
@@ -0,0 +1,35 @@
+from alpinelinux
+ http://git.alpinelinux.org/cgit/aports/tree/main/alsa-lib/alsa-lib-portable-mutex.patch
+--- alsa-lib-1.0.27.2.orig/src/conf.c 2013-07-08 14:31:36.000000000 +0200
++++ alsa-lib-1.0.27.2/src/conf.c 2013-10-02 14:32:15.000000000 +0200
+@@ -427,8 +427,8 @@ beginning:
+ #ifndef DOC_HIDDEN
+
+ #ifdef HAVE_LIBPTHREAD
+-static pthread_mutex_t snd_config_update_mutex =
+- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++static pthread_mutex_t snd_config_update_mutex;
++static pthread_once_t snd_config_update_mutex_once = PTHREAD_ONCE_INIT;
+ #endif
+
+ struct _snd_config {
+@@ -472,8 +472,19 @@ typedef struct {
+
+ #ifdef HAVE_LIBPTHREAD
+
++static void snd_config_init_mutex(void)
++{
++ pthread_mutexattr_t attr;
++
++ pthread_mutexattr_init(&attr);
++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
++ pthread_mutex_init(&snd_config_update_mutex, &attr);
++ pthread_mutexattr_destroy(&attr);
++}
++
+ static inline void snd_config_lock(void)
+ {
++ pthread_once(&snd_config_update_mutex_once, snd_config_init_mutex);
+ pthread_mutex_lock(&snd_config_update_mutex);
+ }
+
--
cgit v1.2.3