All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] parted: fix minor()/major() build failure due to glibc 2.28
@ 2018-09-09 17:29 Giulio Benetti
  2018-09-10  7:25 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Giulio Benetti @ 2018-09-09 17:29 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()/minor() are used.

This commit adds a patch to directly include <sys/sysmacros.h> into
libparted/arch/linux.c files where minor() and major() macros are used.

Fixes:
http://autobuild.buildroot.net/results/d3a/d3a3cd9963e5a2be1cec8fb553f5b20fc2e3c85c//
http://autobuild.buildroot.net/results/ecf/ecfb634b5e6dac2c88b399fc1f1adc68ca42504c//

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 ...e-sys-sysmacros.h-to-compile-with-gl.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch

diff --git a/package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch b/package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch
new file mode 100644
index 0000000000..63dda4c4ff
--- /dev/null
+++ b/package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch
@@ -0,0 +1,33 @@
+From 715e3e937536326af272c45a86cc3765f00297f7 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@micronovasrl.com>
+Date: Sun, 9 Sep 2018 19:19:19 +0200
+Subject: [PATCH] libparted: include <sys/sysmacros.h> to compile with
+ glibc-2.28
+
+glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
+and therefore <sys/sysmacros.h> must be included explicitly when
+major()/minor() are used.
+
+Include <sys/sysmacros.h> into libparted/arch/linux.c where minor() and
+major() macros are used.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
+---
+ libparted/arch/linux.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
+index 0f18904..b302d63 100644
+--- a/libparted/arch/linux.c
++++ b/libparted/arch/linux.c
+@@ -37,6 +37,7 @@
+ #include <dirent.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/utsname.h>        /* for uname() */
+ #include <scsi/scsi.h>
+-- 
+2.17.1
+
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-10 13:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-09 17:29 [Buildroot] [PATCH] parted: fix minor()/major() build failure due to glibc 2.28 Giulio Benetti
2018-09-10  7:25 ` Thomas Petazzoni
2018-09-10 10:49   ` Giulio Benetti
2018-09-10 11:46     ` Yegor Yefremov
2018-09-10 12:08       ` Thomas Petazzoni
2018-09-10 13:48         ` Giulio Benetti

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.