* [Buildroot] [PATCH] package/lirc-tools: fix build with GCC 14.x
@ 2025-08-28 21:58 Thomas Petazzoni via buildroot
2025-08-29 8:19 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-08-28 21:58 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni
Since glibc 2.28, <sys/sysmacros.h> is no longer implicitly included
by <sys/types.h>, which means major() is only defined is you include
<sys/sysmacros.h>.
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 <thomas.petazzoni@bootlin.com>
---
...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 <milanvit@milanvit.net>
+Date: Fri, 24 May 2024 18:34:26 +0900
+Subject: [PATCH] Fix default.so plugin not loading
+
+Upstream: 5d9e0f17436a98aedd0da885bd0096e147e54423
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ 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 <stdbool.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <dirent.h>
+ #include <errno.h>
+
+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 <stdint.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+--
+2.50.1
+
--
2.50.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-29 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 21:58 [Buildroot] [PATCH] package/lirc-tools: fix build with GCC 14.x Thomas Petazzoni via buildroot
2025-08-29 8:19 ` Peter Korsgaard
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.