summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2021-10-17 10:37:34 -0500
committerBen Kohler <bkohler@gentoo.org>2021-10-17 10:50:54 -0500
commita0dd8d6c0edaf5f3aa67f81aef727abe7aff4c86 (patch)
tree3ec9ebf1b8e5e34b5ea36a0db7efc3c6a9d87c2e /net-wireless/iwd
parentdev-ml/merlin: bump to 4.3.1 (diff)
downloadgentoo-a0dd8d6c0edaf5f3aa67f81aef727abe7aff4c86.tar.gz
gentoo-a0dd8d6c0edaf5f3aa67f81aef727abe7aff4c86.tar.bz2
gentoo-a0dd8d6c0edaf5f3aa67f81aef727abe7aff4c86.zip
net-wireless/iwd: backport musl fix
Closes: https://bugs.gentoo.org/818700 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'net-wireless/iwd')
-rw-r--r--net-wireless/iwd/files/iwd-1.18-musl-backport.patch30
-rw-r--r--net-wireless/iwd/iwd-1.18.ebuild5
2 files changed, 33 insertions, 2 deletions
diff --git a/net-wireless/iwd/files/iwd-1.18-musl-backport.patch b/net-wireless/iwd/files/iwd-1.18-musl-backport.patch
new file mode 100644
index 000000000000..99371ca3bb4e
--- /dev/null
+++ b/net-wireless/iwd/files/iwd-1.18-musl-backport.patch
@@ -0,0 +1,30 @@
+From 42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7 Mon Sep 17 00:00:00 2001
+From: Andrew Zaborowski <andrew.zaborowski@intel.com>
+Date: Thu, 16 Sep 2021 01:58:29 +0200
+Subject: netconfig: Remove usage of in6_addr.__in6_u
+
+in6_addr.__in6_u.__u6_addr8 is glibc-specific and named differently in
+the headers shipped with musl libc for example. The POSIX compliant and
+universal way of accessing it is in6_addr.s6_addr.
+---
+ src/netconfig.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+(limited to 'src/netconfig.c')
+
+diff --git a/src/netconfig.c b/src/netconfig.c
+index ce95db0b..421270c9 100644
+--- a/src/netconfig.c
++++ b/src/netconfig.c
+@@ -171,7 +171,7 @@ static inline char *netconfig_ipv6_to_string(const uint8_t *addr)
+ struct in6_addr in6_addr;
+ char *addr_str = l_malloc(INET6_ADDRSTRLEN);
+
+- memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16);
++ memcpy(in6_addr.s6_addr, addr, 16);
+
+ if (L_WARN_ON(unlikely(!inet_ntop(AF_INET6, &in6_addr, addr_str,
+ INET6_ADDRSTRLEN)))) {
+--
+cgit 1.2.3-1.el7
+
diff --git a/net-wireless/iwd/iwd-1.18.ebuild b/net-wireless/iwd/iwd-1.18.ebuild
index d4be6c4edc9a..e12f511a796c 100644
--- a/net-wireless/iwd/iwd-1.18.ebuild
+++ b/net-wireless/iwd/iwd-1.18.ebuild
@@ -22,8 +22,8 @@ HOMEPAGE="https://git.kernel.org/pub/scm/network/wireless/iwd.git/"
LICENSE="GPL-2"
SLOT="0"
-IUSE="+client +crda +monitor ofono wired cpu_flags_x86_aes cpu_flags_x86_ssse3
-standalone systemd"
+IUSE="+client cpu_flags_x86_aes cpu_flags_x86_ssse3 +crda elibc_musl +monitor ofono
+standalone systemd wired"
DEPEND="
sys-apps/dbus
@@ -131,6 +131,7 @@ src_unpack() {
src_prepare() {
default
+ use elibc_musl && eapply "${FILESDIR}"/iwd-1.18-musl-backport.patch
if [[ ${PV} == *9999* ]] ; then
eautoreconf
fi