summaryrefslogtreecommitdiff
path: root/dev-libs/libgamin/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-libs/libgamin/files
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-libs/libgamin/files')
-rw-r--r--dev-libs/libgamin/files/libgamin-0.1.10-musl-pthread.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-musl-pthread.patch b/dev-libs/libgamin/files/libgamin-0.1.10-musl-pthread.patch
new file mode 100644
index 000000000000..35ad2602c46b
--- /dev/null
+++ b/dev-libs/libgamin/files/libgamin-0.1.10-musl-pthread.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/538474
+https://bugzilla.gnome.org/show_bug.cgi?id=588337
+
+From: Felix Janda <felix.janda@posteo.de>
+Date: Mon, 2 Feb 2015 20:08:40 +0100
+Subject: [PATCH] Use PTHREAD_MUTEX_RECURSIVE unconditionally
+
+Previously the nonportable PTHREAD_MUTEX_RECURSIVE_NP had been
+used for portability with glibc. However since 1998 glibc also
+has PTHREAD_MUTEX_RECURSIVE if _XOPEN_SOURCE is >= 500. So we
+can use the portable version for all known systems.
+--- a/libgamin/gam_data.c
++++ b/libgamin/gam_data.c
+@@ -2,6 +2,7 @@
+ * gam_data.c: implementation of the connection data handling of libgamin
+ */
+
++#define _XOPEN_SOURCE 700
+ #include <stdlib.h>
+ #include <string.h> /* for memset */
+ #include <stdio.h>
+@@ -470,11 +471,7 @@ gamin_data_new(void)
+ }
+ if (is_threaded > 0) {
+ pthread_mutexattr_init(&attr);
+-#if defined(linux) || defined(PTHREAD_MUTEX_RECURSIVE_NP)
+- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+-#else
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+-#endif
+ pthread_mutex_init(&ret->lock, &attr);
+ pthread_mutexattr_destroy(&attr);
+ }