Skip to contentSkip to conversation

dvdrw-tools: fix minor()/major() build failure due to glibc 2.28

PATCH Superseded Giulio Benetti 2 participants 3 messages Sep 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dvdrw-tools: 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 growisofs.c where minor() and major() macros are used.

Fixes:
http://autobuild.buildroot.net/results/763/763879f845ffd43343a7b4d548b1eba991d572bd//

---
Changes V1->V2:
* remove #include <sys/sysmacros.h> from transport.hxx, it's useless, only growisofs.c needs it.

 ...ude-sysmacros.h-to-compile-with-newer-gcc.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch
package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch new file +14 -0
new file mode 100644
index 0000000000..e1b893d0be
@@ -0,0 +1,14 @@
+growisofs.c: include sysmacros.h to compile with newer gcc
+
+Signed-off-by: Giulio Benetti <[email protected]>
+
+diff -urpN dvd+rw-tools-7.1.orig/growisofs.c dvd+rw-tools-7.1/growisofs.c
+--- dvd+rw-tools-7.1.orig/growisofs.c	2018-09-08 01:56:11.686656819 +0200
++++ dvd+rw-tools-7.1/growisofs.c	2018-09-08 02:11:45.868778471 +0200
+@@ -441,6 +441,7 @@
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <assert.h>
+ #include "mp.h"
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 dvdrw-tools: fix minor()/major() build failure due to glibc 2.28

Hello,

Quoted 26 lines · Giulio Benetti

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 growisofs.c where minor() and major() macros are used.

Fixes:
http://autobuild.buildroot.net/results/763/763879f845ffd43343a7b4d548b1eba991d572bd//

---
Changes V1->V2:
* remove #include <sys/sysmacros.h> from transport.hxx, it's useless, only growisofs.c needs it.

 ...ude-sysmacros.h-to-compile-with-newer-gcc.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch
package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch new file +0 -0
new file mode 100644
index 0000000000..e1b893d0be

package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch line 1

Quoted 1 line
package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch new file +1 -0
@@ -0,0 +1,14 @@
+growisofs.c: include sysmacros.h to compile with newer gcc

The problem has nothing to do with a "newer gcc". I'm not sure why you got the commit log correct (glibc 2.28 is the reason for the problem), but not the patch description.

Anyway, I fixed the patch description, and applied to master. Thanks!

Thomas

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

PATCH v2 1/1 dvdrw-tools: fix minor()/major() build failure due to glibc 2.28

Hello,

Il 08/09/2018 15:38, Thomas Petazzoni ha scritto:

Quoted 23 lines

Hello,

Quoted 20 lines · Giulio Benetti

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 growisofs.c where minor() and major() macros are used.

Fixes:
http://autobuild.buildroot.net/results/763/763879f845ffd43343a7b4d548b1eba991d572bd//

---
Changes V1->V2:
* remove #include <sys/sysmacros.h> from transport.hxx, it's useless, only growisofs.c needs it.

  ...ude-sysmacros.h-to-compile-with-newer-gcc.patch | 14 ++++++++++++++
  1 file changed, 14 insertions(+)

create mode 100644 package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch

Quoted 11 lines

package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch line 1

Quoted 7 lines
package/dvdrw-tools/0002-Include-sysmacros.h-to-compile-with-newer-gcc.patch new file +1 -0
new file mode 100644
index 0000000000..e1b893d0be
@@ -0,0 +1,14 @@
+growisofs.c: include sysmacros.h to compile with newer gcc

The problem has nothing to do with a "newer gcc". I'm not sure why you got the commit log correct (glibc 2.28 is the reason for the problem), but not the patch description.

You're right, I've been misled by another patch taken from upstream:
https://github.com/giuliobenetti/buildroot/commit/4ffde065d2829d90cddc70f7c2e8f5775e59cbe9

Anyway yes, GCC doesn't anything to do with this, it's a glibc problem. Sorry and thank you for correcting.

Giulio Benetti