From 2313c2324207a36415e1163bddda175b717ce8a7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 28 Aug 2025 23:58:17 +0200 Subject: [PATCH] package/lirc-tools: fix build with GCC 14.x Since glibc 2.28, is no longer implicitly included by , which means major() is only defined if you include . This wasn't really visible for a while in loadable plugins built by lirc-tools as they could happily be built with undefined symbols... except they would fail to load at runtime. But then GCC 14.x brought more strict checking of having the function prototype around, which now detects this issue at build time. So the actual issue has been around since we switched to glibc 2.28, but it only started failing to build since gcc 14.x. The first failure is on August 2024, so this patch should be backported to our stable branches. The fix is backport from an upstream commit, post 0.10.2. Fixes: https://autobuild.buildroot.net/results/2f64accd430d9467add3f1195f3f59eff8e99a4d/ Minimal reproducer: BR2_arm=y BR2_cortex_a9=y BR2_ARM_ENABLE_VFP=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set BR2_PACKAGE_LIRC_TOOLS=y # BR2_TARGET_ROOTFS_TAR is not set Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- ...03-Fix-default.so-plugin-not-loading.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/lirc-tools/0003-Fix-default.so-plugin-not-loading.patch diff --git a/package/lirc-tools/0003-Fix-default.so-plugin-not-loading.patch b/package/lirc-tools/0003-Fix-default.so-plugin-not-loading.patch new file mode 100644 index 0000000000..3b2d536055 --- /dev/null +++ b/package/lirc-tools/0003-Fix-default.so-plugin-not-loading.patch @@ -0,0 +1,39 @@ +From 515325a90a9007fa12737c93c5c47ffaf6fea983 Mon Sep 17 00:00:00 2001 +From: Milan Vit +Date: Fri, 24 May 2024 18:34:26 +0900 +Subject: [PATCH] Fix default.so plugin not loading + +Upstream: 5d9e0f17436a98aedd0da885bd0096e147e54423 +Signed-off-by: Thomas Petazzoni +--- + lib/drv_enum.c | 1 + + plugins/default.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/lib/drv_enum.c b/lib/drv_enum.c +index 5fd74d0c..45abaa19 100644 +--- a/lib/drv_enum.c ++++ b/lib/drv_enum.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/plugins/default.c b/plugins/default.c +index 79c942d6..37cba788 100644 +--- a/plugins/default.c ++++ b/plugins/default.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.50.1 +