Skip to contentSkip to conversation

parted: fix minor()/major() build failure due to glibc 2.28

PATCH New Giulio Benetti 3 participants 6 messages Sep 9, 2018 – Sep 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parted: fix minor()/major() build failure due to 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.

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//

---
 ...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
package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch new file +33 -0
new file mode 100644
index 0000000000..63dda4c4ff
@@ -0,0 +1,33 @@
+From 715e3e937536326af272c45a86cc3765f00297f7 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+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 <[email protected]>
+---
+ 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
+
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 parted: fix minor()/major() build failure due to glibc 2.28

Hello,

Quoted 10 lines · Giulio Benetti
package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch new file +4 -0
new file mode 100644
index 0000000000..63dda4c4ff
@@ -0,0 +1,33 @@
+From 715e3e937536326af272c45a86cc3765f00297f7 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Sun, 9 Sep 2018 19:19:19 +0200
+Subject: [PATCH] libparted: include <sys/sysmacros.h> to compile with

package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch line 14

Quoted 10 lines
package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch new file +10 -0
+ 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 <[email protected]>

Please backport upstream commit ba5e0451b51c983e40afd123b6e0d3eddb55e610 instead of coming up with your one fix. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 parted: fix minor()/major() build failure due to glibc 2.28

Hello,

Il 10/09/2018 09:25, Thomas Petazzoni ha scritto:

Quoted 20 lines

Hello,

Quoted 16 lines · Giulio Benetti
package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch new file +10 -0
new file mode 100644
index 0000000000..63dda4c4ff
@@ -0,0 +1,33 @@
+From 715e3e937536326af272c45a86cc3765f00297f7 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+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.
+
Quoted 8 lines

package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch line 14

Quoted 4 lines
package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch new file +4 -0
+Include <sys/sysmacros.h> into libparted/arch/linux.c where minor() and
+major() macros are used.
+
+Signed-off-by: Giulio Benetti <[email protected]>

Please backport upstream commit ba5e0451b51c983e40afd123b6e0d3eddb55e610 instead of coming up with your one fix. Thanks!

I still can't find upstream commits in general, I think I don't know enough some tool you use or I don't know the best way to find them. Can you point me some hint for this?
Maybe using git in certain way, or checking open PR on various git in a certain way in repositories etc.

Thanks in advance

Giulio Benetti

#3 lore raw

PATCH 1/1 parted: fix minor()/major() build failure due to glibc 2.28

Hello,

Quoted 33 lines · Giulio Benetti

Hello,

Il 10/09/2018 09:25, Thomas Petazzoni ha scritto:

Quoted 20 lines

Hello,

Quoted 16 lines · Giulio Benetti
package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch new file +10 -0
new file mode 100644
index 0000000000..63dda4c4ff
@@ -0,0 +1,33 @@
+From 715e3e937536326af272c45a86cc3765f00297f7 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+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.
+
Quoted 8 lines

package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch line 14

Quoted 4 lines
package/parted/0005-libparted-include-sys-sysmacros.h-to-compile-with-gl.patch new file +4 -0
+Include <sys/sysmacros.h> into libparted/arch/linux.c where minor() and
+major() macros are used.
+
+Signed-off-by: Giulio Benetti <[email protected]>

Please backport upstream commit ba5e0451b51c983e40afd123b6e0d3eddb55e610 instead of coming up with your one fix. Thanks!

Quoted 5 lines

I still can't find upstream commits in general, I think I don't know enough some tool you use or I don't know the best way to find them. Can you point me some hint for this?
Maybe using git in certain way, or checking open PR on various git in a certain way in repositories etc.

Install "tig" and invoke:

tig blame libparted/arch/linux.c

scroll to the line with: #include <sys/sysmacros.h> and you get your commit ba5e0451b51c983e40afd123b6e0d3eddb55e610

Yegor

#4 lore raw

PATCH 1/1 parted: fix minor()/major() build failure due to glibc 2.28

Hello,

Quoted 9 lines · Yegor Yefremov
Quoted 5 lines

I still can't find upstream commits in general, I think I don't know enough some tool you use or I don't know the best way to find them. Can you point me some hint for this?
Maybe using git in certain way, or checking open PR on various git in a certain way in repositories etc.

Install "tig" and invoke:

tig blame libparted/arch/linux.c

What I typically do is just:

git log -p <file>

and then use the search to find if there is a commit that looks relevant.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 1/1 parted: fix minor()/major() build failure due to glibc 2.28

Hello,

Il 10/09/2018 14:08, Thomas Petazzoni ha scritto:

Quoted 12 lines

Hello,

Quoted 8 lines · Yegor Yefremov
Quoted 5 lines

I still can't find upstream commits in general, I think I don't know enough some tool you use or I don't know the best way to find them. Can you point me some hint for this?
Maybe using git in certain way, or checking open PR on various git in a certain way in repositories etc.

Install "tig" and invoke:

Quoted 8 lines
Quoted 1 line

tig blame libparted/arch/linux.c

What I typically do is just:

git log -p <file>

and then use the search to find if there is a commit that looks relevant.

Thanks for pointing me both tig and git log -p,
I was checking on wrong git Repo:
salsa.debian.org
instead the official one is this:
http://git.savannah.gnu.org/cgit/parted.git

Now all is clear!

Thanks gentlemen!

Going to submit v2 with upstream.

Giulio Benetti