[Buildroot] [PATCH 1/2] package/libnl: fix build with kernel < 4.15
Bernd Kuhls <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Buildroot commit 0f2e9cc8784715bdf18e72c433fe9bece4537f85 bumped the package from 3.11.0 to 3.12.0. This bump includes upstream commit https://github.com/thom311/libnl/commit/9f8945251da404fb59778edc74be5775091e1f44 which added the usage of enums not present in older kernel versions. The Gitlab pipelines caught the build errors with the defconfig bootlin-aarch64-glibc-old: lib/route/nh_encap_ila.c:50:19: error: ‘ILA_ATTR_IDENT_TYPE’ undeclared (first use in this function) lib/route/nh_encap_ila.c:53:19: error: ‘ILA_ATTR_HOOK_TYPE’ undeclared (first use in this function) Both enums were added to the Linux kernel in version 4.15: https://github.com/torvalds/linux/commit/fddb231ebe647749782a9ebf11106a81f7168ba7 https://github.com/torvalds/linux/commit/70d5aef48a421a68bd9d1bf8f8267af406681580 Add upstream commit to fix the problem. Signed-off-by: Bernd Kuhls <[email protected]> --- Gitlab pipelines passed: https://gitlab.com/bkuhls/buildroot/-/commits/929b31b2321208683f5f3e7a601fe75188c2ca32 ...ude-linux-include-linux-header-ila.h.patch | 107 ++++++++++++++++++ package/libnl/libnl.mk | 4 + 2 files changed, 111 insertions(+) create mode 100644 package/libnl/0002-include-linux-include-linux-header-ila.h.patch diff --git a/package/libnl/0002-include-linux-include-linux-header-ila.h.patch b/package/libnl/0002-include-linux-include-linux-header-ila.h.patch new file mode 100644 index 0000000000..3270366dac --- /dev/null +++ b/package/libnl/0002-include-linux-include-linux-header-ila.h.patch @@ -0,0 +1,107 @@ +From 49f8b364c9a6f6db4ab535f999386fecfa38241b Mon Sep 17 00:00:00 2001 +From: Thomas Haller <[email protected]> +Date: Thu, 11 Dec 2025 22:27:07 +0100 +Subject: [PATCH] include/linux: include linux header "ila.h" + +Taken from v6.18 (7d0a66e4bb9081d75c82ec4957c50034cb0ea449). + +https://github.com/thom311/libnl/issues/447 + +Upstream: https://github.com/thom311/libnl/commit/49f8b364c9a6f6db4ab535f999386fecfa38241b + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + Makefile.am | 1 + + include/linux-private/linux/ila.h | 68 +++++++++++++++++++++++++++++++ + 2 files changed, 69 insertions(+) + create mode 100644 include/linux-private/linux/ila.h + +diff --git a/Makefile.am b/Makefile.am +index 2bd0c06e..e63e3112 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -278,6 +278,7 @@ noinst_HEADERS = \ + include/linux-private/linux/if_packet.h \ + include/linux-private/linux/if_tunnel.h \ + include/linux-private/linux/if_vlan.h \ ++ include/linux-private/linux/ila.h \ + include/linux-private/linux/in.h \ + include/linux-private/linux/in6.h \ + include/linux-private/linux/in_route.h \ +diff --git a/include/linux-private/linux/ila.h b/include/linux-private/linux/ila.h +new file mode 100644 +index 00000000..6a6c97cf +--- /dev/null ++++ b/include/linux-private/linux/ila.h +@@ -0,0 +1,68 @@ ++/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ ++/* ila.h - ILA Interface */ ++ ++#ifndef _LINUX_ILA_H ++#define _LINUX_ILA_H ++ ++/* NETLINK_GENERIC related info */ ++#define ILA_GENL_NAME "ila" ++#define ILA_GENL_VERSION 0x1 ++ ++enum { ++ ILA_ATTR_UNSPEC, ++ ILA_ATTR_LOCATOR, /* u64 */ ++ ILA_ATTR_IDENTIFIER, /* u64 */ ++ ILA_ATTR_LOCATOR_MATCH, /* u64 */ ++ ILA_ATTR_IFINDEX, /* s32 */ ++ ILA_ATTR_DIR, /* u32 */ ++ ILA_ATTR_PAD, ++ ILA_ATTR_CSUM_MODE, /* u8 */ ++ ILA_ATTR_IDENT_TYPE, /* u8 */ ++ ILA_ATTR_HOOK_TYPE, /* u8 */ ++ ++ __ILA_ATTR_MAX, ++}; ++ ++#define ILA_ATTR_MAX (__ILA_ATTR_MAX - 1) ++ ++enum { ++ ILA_CMD_UNSPEC, ++ ILA_CMD_ADD, ++ ILA_CMD_DEL, ++ ILA_CMD_GET, ++ ILA_CMD_FLUSH, ++ ++ __ILA_CMD_MAX, ++}; ++ ++#define ILA_CMD_MAX (__ILA_CMD_MAX - 1) ++ ++#define ILA_DIR_IN (1 << 0) ++#define ILA_DIR_OUT (1 << 1) ++ ++enum { ++ ILA_CSUM_ADJUST_TRANSPORT, ++ ILA_CSUM_NEUTRAL_MAP, ++ ILA_CSUM_NO_ACTION, ++ ILA_CSUM_NEUTRAL_MAP_AUTO, ++}; ++ ++enum { ++ ILA_ATYPE_IID = 0, ++ ILA_ATYPE_LUID, ++ ILA_ATYPE_VIRT_V4, ++ ILA_ATYPE_VIRT_UNI_V6, ++ ILA_ATYPE_VIRT_MULTI_V6, ++ ILA_ATYPE_NONLOCAL_ADDR, ++ ILA_ATYPE_RSVD_1, ++ ILA_ATYPE_RSVD_2, ++ ++ ILA_ATYPE_USE_FORMAT = 32, /* Get type from type field in identifier */ ++}; ++ ++enum { ++ ILA_HOOK_ROUTE_OUTPUT, ++ ILA_HOOK_ROUTE_INPUT, ++}; ++ ++#endif /* _LINUX_ILA_H */ +-- +2.47.3 + diff --git a/package/libnl/libnl.mk b/package/libnl/libnl.mk index 2dcb594141..5b79ea24a1 100644 --- a/package/libnl/libnl.mk +++ b/package/libnl/libnl.mk @@ -13,6 +13,10 @@ LIBNL_CPE_ID_VALID = YES LIBNL_INSTALL_STAGING = YES LIBNL_DEPENDENCIES = host-bison host-flex host-pkgconf +# 0002-include-linux-include-linux-header-ila.h.patch +LIBNL_AUTORECONF = YES +HOST_LIBNL_AUTORECONF = YES + HOST_LIBNL_DEPENDENCIES = host-bison host-flex host-pkgconf ifeq ($(BR2_PACKAGE_LIBNL_TOOLS),y) -- 2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot