repo/gentoo:master commit in: dev-libs/nspr/files/, dev-libs/nspr/

"Joonas Niilola" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786165809.0cee0626b0db0ad493380afdab9a610d7614ed0f.juippis@gentoo>
commit:     0cee0626b0db0ad493380afdab9a610d7614ed0f
Author:     RadioNoiseE <rne.kou <AT> icloud <DOT> com>
AuthorDate: Sat Aug  8 03:40:00 2026 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Aug  8 05:10:09 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cee0626

dev-libs/nspr: fix musl ipv6 patch for nspr-4.40

Closes: https://bugs.gentoo.org/980499
Signed-off-by: RadioNoiseE <rne.kou <AT> icloud.com>
Part-of: https://github.com/gentoo/gentoo/pull/46659
Closes: https://github.com/gentoo/gentoo/pull/46659
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../nspr/files/nspr-4.40-ipv6-musl-support.patch   | 45 ++++++++++++++++++++++
 dev-libs/nspr/nspr-4.40.ebuild                     |  2 +-
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/dev-libs/nspr/files/nspr-4.40-ipv6-musl-support.patch b/dev-libs/nspr/files/nspr-4.40-ipv6-musl-support.patch
new file mode 100644
index 000000000000..ba7d9386eb0e
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.40-ipv6-musl-support.patch
@@ -0,0 +1,45 @@
+From 2e6a43c751707b6983760669988ba4d2826ffd5b Mon Sep 17 00:00:00 2001
+From: Violet Purcell <[email protected]>
+Date: Sat, 10 Jun 2023 04:37:55 +0000
+Subject: [PATCH] Added IPv6 compatibility for musl libc
+
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
+@@ -326,33 +326,19 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
+ #endif /* __arm__ */
+ 
+ #define USE_SETJMP
+-#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID)
+ #define _PR_POLL_AVAILABLE
+-#endif
+ #undef _PR_USE_POLL
+ #define _PR_STAT_HAS_ONLY_ST_ATIME
+-#if defined(__alpha) || defined(__ia64__)
+ #define _PR_HAVE_LARGE_OFF_T
+-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || \
+-    defined(ANDROID)
+-#define _PR_HAVE_OFF64_T
+-#else
+-#define _PR_NO_LARGE_FILES
+-#endif
+-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || \
+-    defined(ANDROID)
++#define _FILE_OFFSET_BITS 64
+ #define _PR_INET6
+ #define _PR_HAVE_INET_NTOP
+ #define _PR_HAVE_GETHOSTBYNAME2
+ #define _PR_HAVE_GETADDRINFO
+ #define _PR_INET6_PROBE
+-#endif
+ #ifndef ANDROID
+ #define _PR_HAVE_SYSV_SEMAPHORES
+ #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
+-#endif
+-/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */
+-#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS)
+ #define _PR_HAVE_GETHOST_R
+ #define _PR_HAVE_GETHOST_R_INT
+ #endif
+-- 
+2.41.0
+

diff --git a/dev-libs/nspr/nspr-4.40.ebuild b/dev-libs/nspr/nspr-4.40.ebuild
index 03eea63a2379..f433af51e8f6 100644
--- a/dev-libs/nspr/nspr-4.40.ebuild
+++ b/dev-libs/nspr/nspr-4.40.ebuild
@@ -36,7 +36,7 @@ src_prepare() {
 	default
 
 	if use elibc_musl; then
-		eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
+		eapply "${FILESDIR}"/${PN}-4.40-ipv6-musl-support.patch
 		eapply "${FILESDIR}"/nspr-4.35-bgo-905998-lfs64-musl.patch
 	fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.