All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: linux-amarula@amarulasolutions.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 2/2] package/iproute2: bump to version 6.11.0
Date: Wed, 16 Oct 2024 00:19:45 +0200	[thread overview]
Message-ID: <20241015221945.GB67018@pevik> (raw)
In-Reply-To: <20240923054626.2911036-2-dario.binacchi@amarulasolutions.com>

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

  parent reply	other threads:[~2024-10-15 22:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241015221945.GB67018@pevik \
    --to=petr.vorel@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=linux-amarula@amarulasolutions.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.