* [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers
@ 2024-09-23 5:46 Dario Binacchi
2024-09-23 5:46 ` [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0 Dario Binacchi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Dario Binacchi @ 2024-09-23 5:46 UTC (permalink / raw)
To: buildroot; +Cc: Petr Vorel, Dario Binacchi, linux-amarula
This patch fixes the following error:
arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
442 | NULL, 0,
The analysis of socket.h [1] containing the msghdr structure shows that
it has been modified with the addition of padding fields, which cause
the compilation error:
struct msghdr {
void *msg_name;
socklen_t msg_namelen;
struct iovec *msg_iov;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
int __pad1;
#endif
int msg_iovlen;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
int __pad1;
#endif
void *msg_control;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
int __pad2;
#endif
socklen_t msg_controllen;
#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
int __pad2;
#endif
int msg_flags;
};
The use of designated initializers allows the issue to be fixed.
[1] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h
Fixes:
- http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
No changes since v1
...ted-initializers-for-msghdr-structur.patch | 70 +++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch
diff --git a/package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch b/package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch
new file mode 100644
index 000000000000..f8b9f7d08877
--- /dev/null
+++ b/package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch
@@ -0,0 +1,70 @@
+From 13cea6bb5e4f08f534fa4b04b5fc4ea0c8a2467b Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Wed, 18 Sep 2024 14:22:34 +0200
+Subject: [PATCH] arpd: use designated initializers for msghdr structure
+
+This patch fixes the following error:
+
+arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
+ 442 | NULL, 0,
+
+raised by Buildroot autobuilder [1].
+
+In the case in question, the analysis of socket.h [2] containing the
+msghdr structure shows that it has been modified with the addition of
+padding fields, which cause the compilation error. The use of designated
+initializers allows the issue to be fixed.
+
+struct msghdr {
+ void *msg_name;
+ socklen_t msg_namelen;
+ struct iovec *msg_iov;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
+ int __pad1;
+#endif
+ int msg_iovlen;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
+ int __pad1;
+#endif
+ void *msg_control;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
+ int __pad2;
+#endif
+ socklen_t msg_controllen;
+#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
+ int __pad2;
+#endif
+ int msg_flags;
+};
+
+[1] http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c/
+[2] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://lore.kernel.org/netdev/20240919132454.7394-1-dario.binacchi@amarulasolutions.com/T/#mac98a56b7ce0235a6e2b97afe8aa8565de4c926d
+---
+ misc/arpd.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/misc/arpd.c b/misc/arpd.c
+index e77ef53928a2..b4935c23eebb 100644
+--- a/misc/arpd.c
++++ b/misc/arpd.c
+@@ -437,10 +437,10 @@ static void get_kern_msg(void)
+ struct iovec iov;
+ char buf[8192];
+ struct msghdr msg = {
+- (void *)&nladdr, sizeof(nladdr),
+- &iov, 1,
+- NULL, 0,
+- 0
++ .msg_name = &nladdr, .msg_namelen = sizeof(nladdr),
++ .msg_iov = &iov, .msg_iovlen = 1,
++ .msg_control = (void *)NULL, .msg_controllen = 0,
++ .msg_flags = 0
+ };
+
+ iov.iov_base = buf;
+--
+2.43.0
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0
2024-09-23 5:46 [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers Dario Binacchi
@ 2024-09-23 5:46 ` Dario Binacchi
2024-09-23 5:59 ` Baruch Siach via buildroot
2024-10-15 22:19 ` Petr Vorel
2024-10-15 22:12 ` [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers Petr Vorel
2024-10-26 8:47 ` Thomas Petazzoni via buildroot
2 siblings, 2 replies; 6+ messages in thread
From: Dario Binacchi @ 2024-09-23 5:46 UTC (permalink / raw)
To: buildroot; +Cc: Petr Vorel, Dario Binacchi, linux-amarula
The building test using musl as the C library for the cross-compilation
toolchain raised errors that required the application of two additional
patches.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes v1 -> v2:
- Drop changes in .mk. After applying the patches they are not required
anymore.
- Update commit message.
...04-bridge-mst-fix-a-musl-build-issue.patch | 73 +++++++++++++++++++
...e-mst-fix-a-further-musl-build-issue.patch | 56 ++++++++++++++
package/iproute2/iproute2.hash | 2 +-
package/iproute2/iproute2.mk | 2 +-
4 files changed, 131 insertions(+), 2 deletions(-)
create mode 100644 package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
create mode 100644 package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
diff --git a/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
new file mode 100644
index 000000000000..9dddfb6e7f26
--- /dev/null
+++ b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
@@ -0,0 +1,73 @@
+From 0359ee6dc57ee8aa21a3f0f7404422c0f9372d3a Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Sun, 22 Sep 2024 14:00:42 +0200
+Subject: [PATCH] bridge: mst: fix a musl build issue
+
+This patch fixes a compilation error raised by the bump to version 6.11.0
+in Buildroot using musl as the C library for the cross-compilation
+toolchain.
+
+After setting the CFLGAS
+
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
+IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \
+ -D__UAPI_DEF_IPV6_MREQ=0
+endif
+
+to fix the following errors:
+
+In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9,
+ from ../include/libnetlink.h:14,
+ from mst.c:10:
+../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr'
+ 23 | struct in6_addr {
+ | ^~~~~~~~
+In file included from ../include/uapi/linux/if_bridge.h:19,
+ from mst.c:7:
+../include/uapi/linux/in6.h:33:8: note: originally defined here
+ 33 | struct in6_addr {
+ | ^~~~~~~~
+../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6'
+ 34 | struct sockaddr_in6 {
+ | ^~~~~~~~~~~~
+../include/uapi/linux/in6.h:50:8: note: originally defined here
+ 50 | struct sockaddr_in6 {
+ | ^~~~~~~~~~~~
+../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq'
+ 42 | struct ipv6_mreq {
+ | ^~~~~~~~~
+../include/uapi/linux/in6.h:60:8: note: originally defined here
+ 60 | struct ipv6_mreq {
+
+I got this further errors
+
+../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type
+ 72 | struct in6_addr flr_dst;
+ | ^~~~~~~
+../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type
+ 711 | struct in6_addr ip6;
+ | ^~~
+
+fixed by including the netinet/in.h header.
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-1-dario.binacchi@amarulasolutions.com/
+---
+ bridge/mst.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bridge/mst.c b/bridge/mst.c
+index 873ca5369fd6..c8f7e6606c3c 100644
+--- a/bridge/mst.c
++++ b/bridge/mst.c
+@@ -4,6 +4,7 @@
+ */
+
+ #include <stdio.h>
++#include <netinet/in.h>
+ #include <linux/if_bridge.h>
+ #include <net/if.h>
+
+--
+2.43.0
+
diff --git a/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
new file mode 100644
index 000000000000..f4e7c317bf9c
--- /dev/null
+++ b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
@@ -0,0 +1,56 @@
+From 62c4dfff5ff596984ece7960fba49b05d69f37a7 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Sun, 22 Sep 2024 14:11:18 +0200
+Subject: [PATCH] bridge: mst: fix a further musl build issue
+
+This patch fixes the following build errors:
+
+In file included from mst.c:11:
+../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
+ 80 | _PRINT_FUNC(tv, const struct timeval *)
+ | ^~~~~~~
+../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
+ 50 | type value); \
+ | ^~~~
+../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
+ 80 | _PRINT_FUNC(tv, const struct timeval *)
+ | ^~~~~~~
+../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
+ 55 | type value) \
+ | ^~~~
+../include/json_print.h: In function 'print_tv':
+../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
+ 58 | value); \
+ | ^~~~~
+ | |
+ | const struct timeval *
+../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
+ 80 | _PRINT_FUNC(tv, const struct timeval *)
+ | ^~~~~~~~~~~
+../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *'
+ 50 | type value); \
+ | ^
+../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
+ 80 | _PRINT_FUNC(tv, const struct timeval *)
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-2-dario.binacchi@amarulasolutions.com/
+---
+ bridge/mst.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bridge/mst.c b/bridge/mst.c
+index c8f7e6606c3c..fccb7fd68140 100644
+--- a/bridge/mst.c
++++ b/bridge/mst.c
+@@ -4,6 +4,7 @@
+ */
+
+ #include <stdio.h>
++#include <sys/time.h>
+ #include <netinet/in.h>
+ #include <linux/if_bridge.h>
+ #include <net/if.h>
+--
+2.43.0
+
diff --git a/package/iproute2/iproute2.hash b/package/iproute2/iproute2.hash
index 0760183b9e66..028a32439644 100644
--- a/package/iproute2/iproute2.hash
+++ b/package/iproute2/iproute2.hash
@@ -1,3 +1,3 @@
# From https://kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc
-sha256 91a62f82737b44905a00fa803369c447d549e914e9a2a4018fdd75b1d54e8dce iproute2-6.10.0.tar.xz
+sha256 1f795398a04aeaacd06a8f6ace2cfd913c33fa5953ca99daae83bb5c534611c3 iproute2-6.11.0.tar.xz
sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING
diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
index 08b890b33117..c452b64cdea1 100644
--- a/package/iproute2/iproute2.mk
+++ b/package/iproute2/iproute2.mk
@@ -4,7 +4,7 @@
#
################################################################################
-IPROUTE2_VERSION = 6.10.0
+IPROUTE2_VERSION = 6.11.0
IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz
IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2
IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0
2024-09-23 5:46 ` [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0 Dario Binacchi
@ 2024-09-23 5:59 ` Baruch Siach via buildroot
2024-10-15 22:19 ` Petr Vorel
1 sibling, 0 replies; 6+ messages in thread
From: Baruch Siach via buildroot @ 2024-09-23 5:59 UTC (permalink / raw)
To: Dario Binacchi; +Cc: Petr Vorel, linux-amarula, buildroot
Hi Dario,
On Mon, Sep 23 2024, Dario Binacchi wrote:
> The building test using musl as the C library for the cross-compilation
> toolchain raised errors that required the application of two additional
> patches.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
> Changes v1 -> v2:
> - Drop changes in .mk. After applying the patches they are not required
> anymore.
> - Update commit message.
>
> ...04-bridge-mst-fix-a-musl-build-issue.patch | 73 +++++++++++++++++++
> ...e-mst-fix-a-further-musl-build-issue.patch | 56 ++++++++++++++
> package/iproute2/iproute2.hash | 2 +-
> package/iproute2/iproute2.mk | 2 +-
> 4 files changed, 131 insertions(+), 2 deletions(-)
> create mode 100644 package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
> create mode 100644 package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
>
> diff --git a/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
> new file mode 100644
> index 000000000000..9dddfb6e7f26
> --- /dev/null
> +++ b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
> @@ -0,0 +1,73 @@
> +From 0359ee6dc57ee8aa21a3f0f7404422c0f9372d3a Mon Sep 17 00:00:00 2001
> +From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Date: Sun, 22 Sep 2024 14:00:42 +0200
> +Subject: [PATCH] bridge: mst: fix a musl build issue
> +
> +This patch fixes a compilation error raised by the bump to version 6.11.0
> +in Buildroot using musl as the C library for the cross-compilation
> +toolchain.
> +
> +After setting the CFLGAS
> +
> +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> +IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \
> + -D__UAPI_DEF_IPV6_MREQ=0
> +endif
I guess you can drop this part now.
baruch
> +
> +to fix the following errors:
> +
> +In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9,
> + from ../include/libnetlink.h:14,
> + from mst.c:10:
> +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr'
> + 23 | struct in6_addr {
> + | ^~~~~~~~
> +In file included from ../include/uapi/linux/if_bridge.h:19,
> + from mst.c:7:
> +../include/uapi/linux/in6.h:33:8: note: originally defined here
> + 33 | struct in6_addr {
> + | ^~~~~~~~
> +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6'
> + 34 | struct sockaddr_in6 {
> + | ^~~~~~~~~~~~
> +../include/uapi/linux/in6.h:50:8: note: originally defined here
> + 50 | struct sockaddr_in6 {
> + | ^~~~~~~~~~~~
> +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq'
> + 42 | struct ipv6_mreq {
> + | ^~~~~~~~~
> +../include/uapi/linux/in6.h:60:8: note: originally defined here
> + 60 | struct ipv6_mreq {
> +
> +I got this further errors
> +
> +../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type
> + 72 | struct in6_addr flr_dst;
> + | ^~~~~~~
> +../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type
> + 711 | struct in6_addr ip6;
> + | ^~~
> +
> +fixed by including the netinet/in.h header.
> +
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-1-dario.binacchi@amarulasolutions.com/
> +---
> + bridge/mst.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/bridge/mst.c b/bridge/mst.c
> +index 873ca5369fd6..c8f7e6606c3c 100644
> +--- a/bridge/mst.c
> ++++ b/bridge/mst.c
> +@@ -4,6 +4,7 @@
> + */
> +
> + #include <stdio.h>
> ++#include <netinet/in.h>
> + #include <linux/if_bridge.h>
> + #include <net/if.h>
> +
> +--
> +2.43.0
> +
> diff --git a/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
> new file mode 100644
> index 000000000000..f4e7c317bf9c
> --- /dev/null
> +++ b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
> @@ -0,0 +1,56 @@
> +From 62c4dfff5ff596984ece7960fba49b05d69f37a7 Mon Sep 17 00:00:00 2001
> +From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Date: Sun, 22 Sep 2024 14:11:18 +0200
> +Subject: [PATCH] bridge: mst: fix a further musl build issue
> +
> +This patch fixes the following build errors:
> +
> +In file included from mst.c:11:
> +../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> + | ^~~~~~~
> +../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
> + 50 | type value); \
> + | ^~~~
> +../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> + | ^~~~~~~
> +../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
> + 55 | type value) \
> + | ^~~~
> +../include/json_print.h: In function 'print_tv':
> +../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
> + 58 | value); \
> + | ^~~~~
> + | |
> + | const struct timeval *
> +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> + | ^~~~~~~~~~~
> +../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *'
> + 50 | type value); \
> + | ^
> +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> +
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-2-dario.binacchi@amarulasolutions.com/
> +---
> + bridge/mst.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/bridge/mst.c b/bridge/mst.c
> +index c8f7e6606c3c..fccb7fd68140 100644
> +--- a/bridge/mst.c
> ++++ b/bridge/mst.c
> +@@ -4,6 +4,7 @@
> + */
> +
> + #include <stdio.h>
> ++#include <sys/time.h>
> + #include <netinet/in.h>
> + #include <linux/if_bridge.h>
> + #include <net/if.h>
> +--
> +2.43.0
> +
> diff --git a/package/iproute2/iproute2.hash b/package/iproute2/iproute2.hash
> index 0760183b9e66..028a32439644 100644
> --- a/package/iproute2/iproute2.hash
> +++ b/package/iproute2/iproute2.hash
> @@ -1,3 +1,3 @@
> # From https://kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc
> -sha256 91a62f82737b44905a00fa803369c447d549e914e9a2a4018fdd75b1d54e8dce iproute2-6.10.0.tar.xz
> +sha256 1f795398a04aeaacd06a8f6ace2cfd913c33fa5953ca99daae83bb5c534611c3 iproute2-6.11.0.tar.xz
> sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING
> diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
> index 08b890b33117..c452b64cdea1 100644
> --- a/package/iproute2/iproute2.mk
> +++ b/package/iproute2/iproute2.mk
> @@ -4,7 +4,7 @@
> #
> ################################################################################
>
> -IPROUTE2_VERSION = 6.10.0
> +IPROUTE2_VERSION = 6.11.0
> IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz
> IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2
> IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers
2024-09-23 5:46 [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers Dario Binacchi
2024-09-23 5:46 ` [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0 Dario Binacchi
@ 2024-10-15 22:12 ` Petr Vorel
2024-10-26 8:47 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2024-10-15 22:12 UTC (permalink / raw)
To: Dario Binacchi; +Cc: linux-amarula, buildroot
Hi Dario,
...
> +diff --git a/misc/arpd.c b/misc/arpd.c
> +index e77ef53928a2..b4935c23eebb 100644
> +--- a/misc/arpd.c
> ++++ b/misc/arpd.c
> +@@ -437,10 +437,10 @@ static void get_kern_msg(void)
> + struct iovec iov;
> + char buf[8192];
> + struct msghdr msg = {
> +- (void *)&nladdr, sizeof(nladdr),
> +- &iov, 1,
> +- NULL, 0,
> +- 0
> ++ .msg_name = &nladdr, .msg_namelen = sizeof(nladdr),
> ++ .msg_iov = &iov, .msg_iovlen = 1,
> ++ .msg_control = (void *)NULL, .msg_controllen = 0,
> ++ .msg_flags = 0
Thanks for fixing this. You used v1 of your patch in netdev ML. You send to ML
second patch which removes useless initializers.
IMHO it's better to have a single patch where these 0 and NLL initializers are
removed. And that in the end Stephen Hemminger merged [1]. Could you please send
new version, which uses this patch and mentions the upstream commit?
Kind regards,
Petr
[1] https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=9c9824bcaf092cb99988d59717674b73b5d0d19c
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0
2024-09-23 5:46 ` [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0 Dario Binacchi
2024-09-23 5:59 ` Baruch Siach via buildroot
@ 2024-10-15 22:19 ` Petr Vorel
1 sibling, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2024-10-15 22:19 UTC (permalink / raw)
To: Dario Binacchi; +Cc: linux-amarula, buildroot
Hi Dario,
Thank you!
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
...
> diff --git a/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
> new file mode 100644
> index 000000000000..9dddfb6e7f26
> --- /dev/null
> +++ b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch
> @@ -0,0 +1,73 @@
> +From 0359ee6dc57ee8aa21a3f0f7404422c0f9372d3a Mon Sep 17 00:00:00 2001
> +From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Date: Sun, 22 Sep 2024 14:00:42 +0200
> +Subject: [PATCH] bridge: mst: fix a musl build issue
> +
> +This patch fixes a compilation error raised by the bump to version 6.11.0
> +in Buildroot using musl as the C library for the cross-compilation
> +toolchain.
> +
> +After setting the CFLGAS
> +
> +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> +IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \
> + -D__UAPI_DEF_IPV6_MREQ=0
> +endif
> +
> +to fix the following errors:
Baruch suggested to drop this part now, but it's a part of upstream patch now.
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=6a77abab92516e65f07f8657fc4e384c4541ce0e
> +
> +In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9,
> + from ../include/libnetlink.h:14,
> + from mst.c:10:
> +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr'
> + 23 | struct in6_addr {
> + | ^~~~~~~~
> +In file included from ../include/uapi/linux/if_bridge.h:19,
> + from mst.c:7:
> +../include/uapi/linux/in6.h:33:8: note: originally defined here
> + 33 | struct in6_addr {
> + | ^~~~~~~~
> +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6'
> + 34 | struct sockaddr_in6 {
> + | ^~~~~~~~~~~~
> +../include/uapi/linux/in6.h:50:8: note: originally defined here
> + 50 | struct sockaddr_in6 {
> + | ^~~~~~~~~~~~
> +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq'
> + 42 | struct ipv6_mreq {
> + | ^~~~~~~~~
> +../include/uapi/linux/in6.h:60:8: note: originally defined here
> + 60 | struct ipv6_mreq {
> +
> +I got this further errors
> +
> +../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type
> + 72 | struct in6_addr flr_dst;
> + | ^~~~~~~
> +../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type
> + 711 | struct in6_addr ip6;
> + | ^~~
> +
> +fixed by including the netinet/in.h header.
> +
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-1-dario.binacchi@amarulasolutions.com/
Maybe to use here upstream commit as a reference:
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=6a77abab92516e65f07f8657fc4e384c4541ce0e
> +---
> + bridge/mst.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/bridge/mst.c b/bridge/mst.c
> +index 873ca5369fd6..c8f7e6606c3c 100644
> +--- a/bridge/mst.c
> ++++ b/bridge/mst.c
> +@@ -4,6 +4,7 @@
> + */
> +
> + #include <stdio.h>
> ++#include <netinet/in.h>
> + #include <linux/if_bridge.h>
> + #include <net/if.h>
> +
> +--
> +2.43.0
> +
> diff --git a/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
> new file mode 100644
> index 000000000000..f4e7c317bf9c
> --- /dev/null
> +++ b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch
> @@ -0,0 +1,56 @@
> +From 62c4dfff5ff596984ece7960fba49b05d69f37a7 Mon Sep 17 00:00:00 2001
> +From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Date: Sun, 22 Sep 2024 14:11:18 +0200
> +Subject: [PATCH] bridge: mst: fix a further musl build issue
> +
> +This patch fixes the following build errors:
> +
> +In file included from mst.c:11:
> +../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> + | ^~~~~~~
> +../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
> + 50 | type value); \
> + | ^~~~
> +../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> + | ^~~~~~~
> +../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
> + 55 | type value) \
> + | ^~~~
> +../include/json_print.h: In function 'print_tv':
> +../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
> + 58 | value); \
> + | ^~~~~
> + | |
> + | const struct timeval *
> +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> + | ^~~~~~~~~~~
> +../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *'
> + 50 | type value); \
> + | ^
> +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
> + 80 | _PRINT_FUNC(tv, const struct timeval *)
> +
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-2-dario.binacchi@amarulasolutions.com/
And here: https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=043ef90e2fa94397eb5c85330889ca4146a6d58a
...
Kind regards,
Petr
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers
2024-09-23 5:46 [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers Dario Binacchi
2024-09-23 5:46 ` [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0 Dario Binacchi
2024-10-15 22:12 ` [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers Petr Vorel
@ 2024-10-26 8:47 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-26 8:47 UTC (permalink / raw)
To: Dario Binacchi; +Cc: buildroot, Petr Vorel, linux-amarula
On Mon, 23 Sep 2024 07:46:25 +0200
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
> This patch fixes the following error:
>
> arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
> 442 | NULL, 0,
>
> The analysis of socket.h [1] containing the msghdr structure shows that
> it has been modified with the addition of padding fields, which cause
> the compilation error:
>
> struct msghdr {
> void *msg_name;
> socklen_t msg_namelen;
> struct iovec *msg_iov;
> #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
> int __pad1;
> #endif
> int msg_iovlen;
> #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
> int __pad1;
> #endif
> void *msg_control;
> #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
> int __pad2;
> #endif
> socklen_t msg_controllen;
> #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
> int __pad2;
> #endif
> int msg_flags;
> };
>
> The use of designated initializers allows the issue to be fixed.
>
> [1] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h
>
> Fixes:
> - http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
> No changes since v1
Series applied, after updating with the comments from Petr.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-26 8:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 5:46 [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers Dario Binacchi
2024-09-23 5:46 ` [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0 Dario Binacchi
2024-09-23 5:59 ` Baruch Siach via buildroot
2024-10-15 22:19 ` Petr Vorel
2024-10-15 22:12 ` [Buildroot] [PATCH v3 1/2] package/iproute2: fix building error using designated initializers Petr Vorel
2024-10-26 8:47 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox