commit:     35606cd7f9fb29a4c83847cfc00ef364f85287a8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 29 06:57:54 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 29 07:03:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35606cd7

dev-libs/npth: fix musl build

Closes: https://bugs.gentoo.org/925443
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/npth/files/npth-1.7-musl.patch | 16 ++++++++++++++++
 dev-libs/npth/npth-1.7-r1.ebuild        |  4 ++++
 2 files changed, 20 insertions(+)

diff --git a/dev-libs/npth/files/npth-1.7-musl.patch 
b/dev-libs/npth/files/npth-1.7-musl.patch
new file mode 100644
index 000000000000..5b51a3fd4a28
--- /dev/null
+++ b/dev-libs/npth/files/npth-1.7-musl.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/925443
+https://dev.gnupg.org/T5664
+--- a/configure.ac
++++ b/configure.ac
+@@ -381,7 +381,10 @@ fi
+ AC_SUBST(INSERT_NO_RWLOCK)
+ 
+ case "${host}" in
+-    *-*-linux*|*-*-gnu*)
++    *-*-linux-musl*)
++        INSERT_EXPOSE_RWLOCK_API="1"
++        ;;
++    *-*-linux-gnu*|*-*-gnu*)
+         INSERT_EXPOSE_RWLOCK_API="defined(__USE_UNIX98) || 
defined(__USE_XOPEN2K)"
+         ;;
+     *)

diff --git a/dev-libs/npth/npth-1.7-r1.ebuild b/dev-libs/npth/npth-1.7-r1.ebuild
index d390d9c7bb59..04b867400ad5 100644
--- a/dev-libs/npth/npth-1.7-r1.ebuild
+++ b/dev-libs/npth/npth-1.7-r1.ebuild
@@ -15,6 +15,10 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k 
~mips ~ppc ~ppc64 ~
 IUSE="test"
 RESTRICT="!test? ( test )"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-musl.patch
+)
+
 src_prepare() {
        default
        eautoreconf

Reply via email to