Gentoo Archives: gentoo-commits

From: Ben Kohler <bkohler@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/iwd/files/, net-wireless/iwd/
Date: Sun, 17 Oct 2021 15:51:12
Message-Id: 1634485854.a0dd8d6c0edaf5f3aa67f81aef727abe7aff4c86.bkohler@gentoo
1 commit: a0dd8d6c0edaf5f3aa67f81aef727abe7aff4c86
2 Author: Ben Kohler <bkohler <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 17 15:37:34 2021 +0000
4 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 17 15:50:54 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0dd8d6c
7
8 net-wireless/iwd: backport musl fix
9
10 Closes: https://bugs.gentoo.org/818700
11 Package-Manager: Portage-3.0.28, Repoman-3.0.3
12 Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
13
14 .../iwd/files/iwd-1.18-musl-backport.patch | 30 ++++++++++++++++++++++
15 net-wireless/iwd/iwd-1.18.ebuild | 5 ++--
16 2 files changed, 33 insertions(+), 2 deletions(-)
17
18 diff --git a/net-wireless/iwd/files/iwd-1.18-musl-backport.patch b/net-wireless/iwd/files/iwd-1.18-musl-backport.patch
19 new file mode 100644
20 index 00000000000..99371ca3bb4
21 --- /dev/null
22 +++ b/net-wireless/iwd/files/iwd-1.18-musl-backport.patch
23 @@ -0,0 +1,30 @@
24 +From 42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7 Mon Sep 17 00:00:00 2001
25 +From: Andrew Zaborowski <andrew.zaborowski@×××××.com>
26 +Date: Thu, 16 Sep 2021 01:58:29 +0200
27 +Subject: netconfig: Remove usage of in6_addr.__in6_u
28 +
29 +in6_addr.__in6_u.__u6_addr8 is glibc-specific and named differently in
30 +the headers shipped with musl libc for example. The POSIX compliant and
31 +universal way of accessing it is in6_addr.s6_addr.
32 +---
33 + src/netconfig.c | 2 +-
34 + 1 file changed, 1 insertion(+), 1 deletion(-)
35 +
36 +(limited to 'src/netconfig.c')
37 +
38 +diff --git a/src/netconfig.c b/src/netconfig.c
39 +index ce95db0b..421270c9 100644
40 +--- a/src/netconfig.c
41 ++++ b/src/netconfig.c
42 +@@ -171,7 +171,7 @@ static inline char *netconfig_ipv6_to_string(const uint8_t *addr)
43 + struct in6_addr in6_addr;
44 + char *addr_str = l_malloc(INET6_ADDRSTRLEN);
45 +
46 +- memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16);
47 ++ memcpy(in6_addr.s6_addr, addr, 16);
48 +
49 + if (L_WARN_ON(unlikely(!inet_ntop(AF_INET6, &in6_addr, addr_str,
50 + INET6_ADDRSTRLEN)))) {
51 +--
52 +cgit 1.2.3-1.el7
53 +
54
55 diff --git a/net-wireless/iwd/iwd-1.18.ebuild b/net-wireless/iwd/iwd-1.18.ebuild
56 index d4be6c4edc9..e12f511a796 100644
57 --- a/net-wireless/iwd/iwd-1.18.ebuild
58 +++ b/net-wireless/iwd/iwd-1.18.ebuild
59 @@ -22,8 +22,8 @@ HOMEPAGE="https://git.kernel.org/pub/scm/network/wireless/iwd.git/"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 -IUSE="+client +crda +monitor ofono wired cpu_flags_x86_aes cpu_flags_x86_ssse3
64 -standalone systemd"
65 +IUSE="+client cpu_flags_x86_aes cpu_flags_x86_ssse3 +crda elibc_musl +monitor ofono
66 +standalone systemd wired"
67
68 DEPEND="
69 sys-apps/dbus
70 @@ -131,6 +131,7 @@ src_unpack() {
71
72 src_prepare() {
73 default
74 + use elibc_musl && eapply "${FILESDIR}"/iwd-1.18-musl-backport.patch
75 if [[ ${PV} == *9999* ]] ; then
76 eautoreconf
77 fi