Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thibaut Collet <thbt.cllt@gmail.com>
To: buildroot@buildroot.org
Cc: thomas.petazzoni@bootlin.com, vjardin@free.fr,
	Thibaut Collet <thbt.cllt@gmail.com>
Subject: [Buildroot] [PATCH v2] package/lldpd: fix compilation issue with kernel 7.3 on aarch64
Date: Wed, 30 Sep 2026 09:24:41 +0200	[thread overview]
Message-ID: <20260930072441.174807-1-thbt.cllt@gmail.com> (raw)

lldpd bundles some uapi linux files for old distributions, especially
the types.h one.

Since kernel commit d4bf9e08d412 ("arm64: uapi: Use __u128 instead of
__uint128_t in UAPI headers"), the type __u128 is used by sigcontext.h.
This type is defined in types.h, but the old version bundled by lldpd
does not provide it. This lack leads to the following compilation error:

  In file included from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/bits/sigcontext.h:30,
                   from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/signal.h:301,
                   from ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/sys/param.h:28,
                   from privsep_io.c:5:
  ../../../../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/asm/sigcontext.h:81:9: error: unknown type name '__u128'; did you mean '__u32'?
     81 |         __u128 vregs[32];
        |         ^~~~~~
        |         __u32

The uapi linux files bundled by lldpd are the ones of kernel 4.19
(https://github.com/lldpd/lldpd/commit/a192a2e91f81), and they are
prepended to the include path, so they shadow the sysroot ones.

Remove them so that lldpd uses the uapi files of the sysroot, but only
when the toolchain provides kernel headers 4.19 or later. With older
headers the bundled files are kept, so those configurations are left
unchanged.

Signed-off-by: Thibaut Collet <thbt.cllt@gmail.com>
---

Changes v1 -> v2:
  - Only remove the bundled headers for kernel headers >= 4.19

 package/lldpd/lldpd.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk
index f0cbc7e436..9ecf622b22 100644
--- a/package/lldpd/lldpd.mk
+++ b/package/lldpd/lldpd.mk
@@ -61,6 +61,13 @@ else
 LLDPD_CONF_OPTS += --without-readline
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19),y)
+define LLDPD_DROP_UAPI_FILES
+	rm -rf $(@D)/include/linux
+endef
+LLDPD_POST_PATCH_HOOKS += LLDPD_DROP_UAPI_FILES
+endif
+
 define LLDPD_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/lldpd/S60lldpd \
 		$(TARGET_DIR)/etc/init.d/S60lldpd
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2026-09-30  7:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  7:24 Thibaut Collet [this message]
2026-09-30  8:48 ` [Buildroot] [PATCH v2] package/lldpd: fix compilation issue with kernel 7.3 on aarch64 Vincent Jardin via buildroot
2026-10-11 21:08 ` Arnout Vandecappelle 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=20260930072441.174807-1-thbt.cllt@gmail.com \
    --to=thbt.cllt@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vjardin@free.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox