* [Buildroot] [PATCH 1/1] package/iwd: fix musl build
@ 2021-09-27 16:35 Fabrice Fontaine
2021-09-27 19:10 ` Peter Seiderer
2021-10-05 19:34 ` Arnout Vandecappelle
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-09-27 16:35 UTC (permalink / raw)
To: buildroot; +Cc: Peter Seiderer, Matt Weber, Fabrice Fontaine
Fix the following build failure with musl raised since bump to version
1.18 in commit 1a7be12e1e10cc09e3a28a8d04a352bbbb63ba3a:
src/netconfig.c: In function 'netconfig_ipv6_to_string':
src/netconfig.c:188:18: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'?
188 | memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16);
| ^~~~~~~
| __in6_union
Fixes:
- http://autobuild.buildroot.org/results/2c4e6cf22e6fb5582470930241904878070f1144
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...nfig-Remove-usage-of-in6_addr__in6_u.patch | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
diff --git a/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch b/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
new file mode 100644
index 0000000000..f6b3d24516
--- /dev/null
+++ b/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
@@ -0,0 +1,32 @@
+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.
+
+[Retrieved from:
+https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/netconfig.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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
+
--
2.33.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/iwd: fix musl build
2021-09-27 16:35 [Buildroot] [PATCH 1/1] package/iwd: fix musl build Fabrice Fontaine
@ 2021-09-27 19:10 ` Peter Seiderer
2021-10-05 19:34 ` Arnout Vandecappelle
1 sibling, 0 replies; 3+ messages in thread
From: Peter Seiderer @ 2021-09-27 19:10 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Matt Weber, buildroot
Hello Fabrice,
On Mon, 27 Sep 2021 18:35:16 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following build failure with musl raised since bump to version
> 1.18 in commit 1a7be12e1e10cc09e3a28a8d04a352bbbb63ba3a:
>
> src/netconfig.c: In function 'netconfig_ipv6_to_string':
> src/netconfig.c:188:18: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'?
> 188 | memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16);
> | ^~~~~~~
> | __in6_union
>
> Fixes:
> - http://autobuild.buildroot.org/results/2c4e6cf22e6fb5582470930241904878070f1144
Thanks for fixing....
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Regards,
Peter
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...nfig-Remove-usage-of-in6_addr__in6_u.patch | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
>
> diff --git a/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch b/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
> new file mode 100644
> index 0000000000..f6b3d24516
> --- /dev/null
> +++ b/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
> @@ -0,0 +1,32 @@
> +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.
> +
> +[Retrieved from:
> +https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + src/netconfig.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +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
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/iwd: fix musl build
2021-09-27 16:35 [Buildroot] [PATCH 1/1] package/iwd: fix musl build Fabrice Fontaine
2021-09-27 19:10 ` Peter Seiderer
@ 2021-10-05 19:34 ` Arnout Vandecappelle
1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-10-05 19:34 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot; +Cc: Peter Seiderer, Matt Weber
On 27/09/2021 18:35, Fabrice Fontaine wrote:
> Fix the following build failure with musl raised since bump to version
> 1.18 in commit 1a7be12e1e10cc09e3a28a8d04a352bbbb63ba3a:
>
> src/netconfig.c: In function 'netconfig_ipv6_to_string':
> src/netconfig.c:188:18: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'?
> 188 | memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16);
> | ^~~~~~~
> | __in6_union
>
> Fixes:
> - http://autobuild.buildroot.org/results/2c4e6cf22e6fb5582470930241904878070f1144
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Applied to master, thanks.
Regards,
Arnout
> ---
> ...nfig-Remove-usage-of-in6_addr__in6_u.patch | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
>
> diff --git a/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch b/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
> new file mode 100644
> index 0000000000..f6b3d24516
> --- /dev/null
> +++ b/package/iwd/0002-netconfig-Remove-usage-of-in6_addr__in6_u.patch
> @@ -0,0 +1,32 @@
> +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.
> +
> +[Retrieved from:
> +https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + src/netconfig.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +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
> +
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-05 19:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 16:35 [Buildroot] [PATCH 1/1] package/iwd: fix musl build Fabrice Fontaine
2021-09-27 19:10 ` Peter Seiderer
2021-10-05 19:34 ` Arnout Vandecappelle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.