aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory A. Pratt <anarchy@gentoo.org>2018-06-05 08:21:46 -0500
committerJory A. Pratt <anarchy@gentoo.org>2018-06-05 08:21:46 -0500
commit1ce2f1f8712573d6d594c0cb75e4cbf7ad9cd359 (patch)
tree0f2dff64225cda433e7cb8a03dcd4ba416795c6a
parentwww-client/firefox: Version bump 61.0_beta11 (diff)
downloadmozilla-1ce2f1f8712573d6d594c0cb75e4cbf7ad9cd359.tar.gz
mozilla-1ce2f1f8712573d6d594c0cb75e4cbf7ad9cd359.tar.bz2
mozilla-1ce2f1f8712573d6d594c0cb75e4cbf7ad9cd359.zip
dev-libs/nspr: add support for ipv6 on musl, thanks Moritz Kick
<gentoo@blackphoenix.de>
-rw-r--r--dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch52
-rw-r--r--dev-libs/nspr/nspr-4.19.ebuild2
2 files changed, 54 insertions, 0 deletions
diff --git a/dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch b/dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch
new file mode 100644
index 0000000..912b28c
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch
@@ -0,0 +1,52 @@
+>From 15d0c4e59e8342d23c070c20097ac8c9b8e15e6c Mon Sep 17 00:00:00 2001
+From: Moritz Kick <gentoo@blackphoenix.de>
+Date: Fri, 1 Jun 2018 00:04:30 +0200
+Subject: [PATCH] Added IPv6 compatibility for musl libc
+
+Signed-off-by: Moritz Kick <gentoo@blackphoenix.de>
+---
+ pr/include/md/_linux.h | 13 +------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
+index b4b298b..e2ef68e 100644
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
+@@ -285,33 +285,22 @@ 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
++#define _PR_HAVE_OFF64_T
+ #endif
+-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
+- || defined(ANDROID)
+ #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.16.4
+
diff --git a/dev-libs/nspr/nspr-4.19.ebuild b/dev-libs/nspr/nspr-4.19.ebuild
index 44af9aa..01daa7c 100644
--- a/dev-libs/nspr/nspr-4.19.ebuild
+++ b/dev-libs/nspr/nspr-4.19.ebuild
@@ -35,6 +35,8 @@ src_prepare() {
default
+ use elibc_musl && epatch "${FILESDIR}"/${PN}-4.19-musl-ipv6.patch
+
# rename configure.in to configure.ac for new autotools compatibility
if [[ -e "${S}"/nspr/configure.in ]] ; then
einfo "Renaming configure.in to configure.ac"