diff options
| -rw-r--r-- | meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch | 76 | ||||
| -rw-r--r-- | meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch | 59 | ||||
| -rw-r--r-- | meta/recipes-connectivity/iproute2/iproute2_6.11.0.bb (renamed from meta/recipes-connectivity/iproute2/iproute2_6.10.0.bb) | 7 |
3 files changed, 141 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch b/meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch new file mode 100644 index 0000000000..3e266b9298 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | From 6a77abab92516e65f07f8657fc4e384c4541ce0e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dario Binacchi <dario.binacchi@amarulasolutions.com> | ||
| 3 | Date: Sun, 22 Sep 2024 16:50:10 +0200 | ||
| 4 | Subject: [PATCH] bridge: mst: fix a musl build issue | ||
| 5 | |||
| 6 | This patch fixes a compilation error raised by the bump to version 6.11.0 | ||
| 7 | in Buildroot using musl as the C library for the cross-compilation | ||
| 8 | toolchain. | ||
| 9 | |||
| 10 | After setting the CFLGAS | ||
| 11 | |||
| 12 | ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) | ||
| 13 | IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \ | ||
| 14 | -D__UAPI_DEF_IPV6_MREQ=0 | ||
| 15 | endif | ||
| 16 | |||
| 17 | to fix the following errors: | ||
| 18 | |||
| 19 | In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9, | ||
| 20 | from ../include/libnetlink.h:14, | ||
| 21 | from mst.c:10: | ||
| 22 | ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr' | ||
| 23 | 23 | struct in6_addr { | ||
| 24 | | ^~~~~~~~ | ||
| 25 | In file included from ../include/uapi/linux/if_bridge.h:19, | ||
| 26 | from mst.c:7: | ||
| 27 | ../include/uapi/linux/in6.h:33:8: note: originally defined here | ||
| 28 | 33 | struct in6_addr { | ||
| 29 | | ^~~~~~~~ | ||
| 30 | ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' | ||
| 31 | 34 | struct sockaddr_in6 { | ||
| 32 | | ^~~~~~~~~~~~ | ||
| 33 | ../include/uapi/linux/in6.h:50:8: note: originally defined here | ||
| 34 | 50 | struct sockaddr_in6 { | ||
| 35 | | ^~~~~~~~~~~~ | ||
| 36 | ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' | ||
| 37 | 42 | struct ipv6_mreq { | ||
| 38 | | ^~~~~~~~~ | ||
| 39 | ../include/uapi/linux/in6.h:60:8: note: originally defined here | ||
| 40 | 60 | struct ipv6_mreq { | ||
| 41 | |||
| 42 | I got this further errors | ||
| 43 | |||
| 44 | ../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type | ||
| 45 | 72 | struct in6_addr flr_dst; | ||
| 46 | | ^~~~~~~ | ||
| 47 | ../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type | ||
| 48 | 711 | struct in6_addr ip6; | ||
| 49 | | ^~~ | ||
| 50 | |||
| 51 | fixed by including the netinet/in.h header. | ||
| 52 | |||
| 53 | Upstream-Status: Backport | ||
| 54 | [https://kernel.googlesource.com/pub/scm/network/iproute2/iproute2/+/6a77abab92516e65f07f8657fc4e384c4541ce0e] | ||
| 55 | |||
| 56 | Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> | ||
| 57 | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> | ||
| 58 | --- | ||
| 59 | bridge/mst.c | 1 + | ||
| 60 | 1 file changed, 1 insertion(+) | ||
| 61 | |||
| 62 | diff --git a/bridge/mst.c b/bridge/mst.c | ||
| 63 | index 873ca536..c8f7e660 100644 | ||
| 64 | --- a/bridge/mst.c | ||
| 65 | +++ b/bridge/mst.c | ||
| 66 | @@ -4,6 +4,7 @@ | ||
| 67 | */ | ||
| 68 | |||
| 69 | #include <stdio.h> | ||
| 70 | +#include <netinet/in.h> | ||
| 71 | #include <linux/if_bridge.h> | ||
| 72 | #include <net/if.h> | ||
| 73 | |||
| 74 | -- | ||
| 75 | 2.39.5 (Apple Git-154) | ||
| 76 | |||
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch b/meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch new file mode 100644 index 0000000000..6a30f6dcf8 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | From 043ef90e2fa94397eb5c85330889ca4146a6d58a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dario Binacchi <dario.binacchi@amarulasolutions.com> | ||
| 3 | Date: Sun, 22 Sep 2024 16:50:11 +0200 | ||
| 4 | Subject: [PATCH] bridge: mst: fix a further musl build issue | ||
| 5 | |||
| 6 | This patch fixes the following build errors: | ||
| 7 | |||
| 8 | In file included from mst.c:11: | ||
| 9 | ../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration | ||
| 10 | 80 | _PRINT_FUNC(tv, const struct timeval *) | ||
| 11 | | ^~~~~~~ | ||
| 12 | ../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC' | ||
| 13 | 50 | type value); \ | ||
| 14 | | ^~~~ | ||
| 15 | ../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration | ||
| 16 | 80 | _PRINT_FUNC(tv, const struct timeval *) | ||
| 17 | | ^~~~~~~ | ||
| 18 | ../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC' | ||
| 19 | 55 | type value) \ | ||
| 20 | | ^~~~ | ||
| 21 | ../include/json_print.h: In function 'print_tv': | ||
| 22 | ../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types] | ||
| 23 | 58 | value); \ | ||
| 24 | | ^~~~~ | ||
| 25 | | | | ||
| 26 | | const struct timeval * | ||
| 27 | ../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' | ||
| 28 | 80 | _PRINT_FUNC(tv, const struct timeval *) | ||
| 29 | | ^~~~~~~~~~~ | ||
| 30 | ../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *' | ||
| 31 | 50 | type value); \ | ||
| 32 | | ^ | ||
| 33 | ../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' | ||
| 34 | 80 | _PRINT_FUNC(tv, const struct timeval *) | ||
| 35 | |||
| 36 | Upstream-Status: Backport | ||
| 37 | [https://kernel.googlesource.com/pub/scm/network/iproute2/iproute2/+/043ef90e2fa94397eb5c85330889ca4146a6d58a] | ||
| 38 | |||
| 39 | Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> | ||
| 40 | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> | ||
| 41 | --- | ||
| 42 | bridge/mst.c | 1 + | ||
| 43 | 1 file changed, 1 insertion(+) | ||
| 44 | |||
| 45 | diff --git a/bridge/mst.c b/bridge/mst.c | ||
| 46 | index c8f7e660..fccb7fd6 100644 | ||
| 47 | --- a/bridge/mst.c | ||
| 48 | +++ b/bridge/mst.c | ||
| 49 | @@ -4,6 +4,7 @@ | ||
| 50 | */ | ||
| 51 | |||
| 52 | #include <stdio.h> | ||
| 53 | +#include <sys/time.h> | ||
| 54 | #include <netinet/in.h> | ||
| 55 | #include <linux/if_bridge.h> | ||
| 56 | #include <net/if.h> | ||
| 57 | -- | ||
| 58 | 2.39.5 (Apple Git-154) | ||
| 59 | |||
diff --git a/meta/recipes-connectivity/iproute2/iproute2_6.10.0.bb b/meta/recipes-connectivity/iproute2/iproute2_6.11.0.bb index 9f0c9aab59..652484a94d 100644 --- a/meta/recipes-connectivity/iproute2/iproute2_6.10.0.bb +++ b/meta/recipes-connectivity/iproute2/iproute2_6.11.0.bb | |||
| @@ -15,7 +15,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ | |||
| 15 | file://0001-include-libnetlink.h-add-missing-include-for-htobe64.patch \ | 15 | file://0001-include-libnetlink.h-add-missing-include-for-htobe64.patch \ |
| 16 | " | 16 | " |
| 17 | 17 | ||
| 18 | SRC_URI[sha256sum] = "91a62f82737b44905a00fa803369c447d549e914e9a2a4018fdd75b1d54e8dce" | 18 | SRC_URI:append:libc-musl = "\ |
| 19 | file://0002-bridge-mst-fix-a-musl-build-issue.patch \ | ||
| 20 | file://0003-bridge-mst-fix-a-further-musl-build-issue.patch \ | ||
| 21 | " | ||
| 22 | |||
| 23 | SRC_URI[sha256sum] = "1f795398a04aeaacd06a8f6ace2cfd913c33fa5953ca99daae83bb5c534611c3" | ||
| 19 | 24 | ||
| 20 | inherit update-alternatives bash-completion pkgconfig | 25 | inherit update-alternatives bash-completion pkgconfig |
| 21 | 26 | ||
