* [Buildroot] [PATCH v2] gpm: fix major() build failure due to glibc 2.28
@ 2018-09-15 13:23 Giulio Benetti
2018-09-16 8:22 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Giulio Benetti @ 2018-09-15 13:23 UTC (permalink / raw)
To: buildroot
glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
and therefore <sys/sysmacros.h> must be included explicitly when major()
is used.
This commit adds a patch to directly include <sys/sysmacros.h> into
open_console.c file where major() macro is used.
Patch has been taken from gpm upstream commit:
https://github.com/telmich/gpm/commit/b350aee4ea5785a75cb6ad770f6b768c506ebb70
Fixes:
http://autobuild.buildroot.net/results/f53/f5373a567de619375746f1dcfe312971b85bb810/
http://autobuild.buildroot.net/results/227/227a7edf9304d85645d3e7fa0f930fe2e9b6e752/
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
.../gpm/0005-fix-building-w-newer-glibc.patch | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 package/gpm/0005-fix-building-w-newer-glibc.patch
diff --git a/package/gpm/0005-fix-building-w-newer-glibc.patch b/package/gpm/0005-fix-building-w-newer-glibc.patch
new file mode 100644
index 0000000000..b451d975e0
--- /dev/null
+++ b/package/gpm/0005-fix-building-w-newer-glibc.patch
@@ -0,0 +1,32 @@
+From b350aee4ea5785a75cb6ad770f6b768c506ebb70 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 14 Mar 2016 15:39:54 -0400
+Subject: [PATCH] fix building w/newer glibc
+
+Linux C libraries are looking to disentangle sysmacros.h from the
+sys/types.h include, so make sure we pull in the header when it is
+found.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
+---
+ src/daemon/open_console.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
+index 4d6c0af..6dd43e6 100644
+--- a/src/daemon/open_console.c
++++ b/src/daemon/open_console.c
+@@ -24,6 +24,10 @@
+ #include <sys/types.h> /* major() */
+ #include <sys/ioctl.h> /* ioctl */
+
++#ifdef HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h> /* major() w/newer glibc */
++#endif
++
+ /* Linux specific (to be outsourced in gpm2 */
+ #include <linux/serial.h> /* for serial console check */
+ #include <asm/ioctls.h> /* for serial console check */
+--
+2.17.1
+
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2] gpm: fix major() build failure due to glibc 2.28
2018-09-15 13:23 [Buildroot] [PATCH v2] gpm: fix major() build failure due to glibc 2.28 Giulio Benetti
@ 2018-09-16 8:22 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-09-16 8:22 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 15 Sep 2018 15:23:59 +0200, Giulio Benetti wrote:
> glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
> and therefore <sys/sysmacros.h> must be included explicitly when major()
> is used.
>
> This commit adds a patch to directly include <sys/sysmacros.h> into
> open_console.c file where major() macro is used.
>
> Patch has been taken from gpm upstream commit:
> https://github.com/telmich/gpm/commit/b350aee4ea5785a75cb6ad770f6b768c506ebb70
>
> Fixes:
> http://autobuild.buildroot.net/results/f53/f5373a567de619375746f1dcfe312971b85bb810/
> http://autobuild.buildroot.net/results/227/227a7edf9304d85645d3e7fa0f930fe2e9b6e752/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> .../gpm/0005-fix-building-w-newer-glibc.patch | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 package/gpm/0005-fix-building-w-newer-glibc.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-16 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-15 13:23 [Buildroot] [PATCH v2] gpm: fix major() build failure due to glibc 2.28 Giulio Benetti
2018-09-16 8:22 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox