From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgamin/files/, dev-libs/libgamin/
Date: Mon, 7 Feb 2022 03:50:36 +0000 (UTC) [thread overview]
Message-ID: <1644205764.11559f90b487fb1480b81dd58eb490e091042f5f.sam@gentoo> (raw)
commit: 11559f90b487fb1480b81dd58eb490e091042f5f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 7 03:49:24 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 7 03:49:24 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11559f90
dev-libs/libgamin: fix musl build
Upstream is long dead and the patch has been used in ::musl for quite
some time.
Closes: https://bugs.gentoo.org/538474
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libgamin-0.1.10-musl-pthread.patch | 33 ++++++++++++++++++++++
dev-libs/libgamin/libgamin-0.1.10-r6.ebuild | 3 ++
2 files changed, 36 insertions(+)
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);
+ }
diff --git a/dev-libs/libgamin/libgamin-0.1.10-r6.ebuild b/dev-libs/libgamin/libgamin-0.1.10-r6.ebuild
index 5353e67256ce..87a88a7e7a0c 100644
--- a/dev-libs/libgamin/libgamin-0.1.10-r6.ebuild
+++ b/dev-libs/libgamin/libgamin-0.1.10-r6.ebuild
@@ -59,6 +59,9 @@ src_prepare() {
# Fix possible server deadlock in ih_sub_cancel, upstream bug #667230
epatch "${FILESDIR}/${PN}-0.1.10-deadlock.patch"
+ # Fix musl build, upstream bug #588337
+ epatch "${FILESDIR}/${PN}-0.1.10-musl-pthread.patch"
+
# Drop DEPRECATED flags
sed -i -e 's:-DG_DISABLE_DEPRECATED:$(NULL):g' server/Makefile.am || die
reply other threads:[~2022-02-07 3:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1644205764.11559f90b487fb1480b81dd58eb490e091042f5f.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox