Skip to contentSkip to conversation

coreutils_6.9.bb: Fix build with glibc 2.34

PATCH Superseded Khem Raj 1 participant 1 message Jul 4, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 coreutils_6.9.bb: Fix build with glibc 2.34

---
 ...-includes-for-glibc-2.34-portability.patch | 35 +++++++++++++++++++
 recipes-core/coreutils/coreutils_6.9.bb       |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 recipes-core/coreutils/coreutils-6.9/0001-sort.c-Reorder-includes-for-glibc-2.34-portability.patch
recipes-core/coreutils/coreutils-6.9/0001-sort.c-Reorder-includes-for-glibc-2.34-portability.patch new file +35 -0
new file mode 100644
index 0000000..f37cb47
@@ -0,0 +1,35 @@
+From e241a55767c4eaac7d14c412d880037cb6d2ee33 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 29 Jun 2021 22:43:16 -0700
+Subject: [PATCH] sort.c: Reorder includes for glibc 2.34 portability
+
+With glibc 2.34 config.h will include stdlib.h and that would disable
+sys/wait.h to include needed definitions from bits/waitflags.h since
+_STDLIB_H would have been defined already and sys/wait.h would think
+these paths are included already, this is fixed with newer gnulib and
+configure so this is to get this old version to compile with latest
+glibc headers
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/sort.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/sort.c
++++ b/src/sort.c
+@@ -21,12 +21,12 @@
+ 
+    Ørn E. Hansen added NLS support in 1997.  */
+ 
++#include <sys/types.h>
++#include <sys/wait.h>
+ #include <config.h>
+ 
+ #include <assert.h>
+ #include <getopt.h>
+-#include <sys/types.h>
+-#include <sys/wait.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <wchar.h>
recipes-core/coreutils/coreutils_6.9.bb +1 -0
index 42b4f3c..69e5489 100644
@@ -27,6 +27,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \
            file://no-man.patch \
            file://build-don-t-need-charset.alias-when-building-for-mus.patch \
            file://no-su.patch \
+           file://0001-sort.c-Reorder-includes-for-glibc-2.34-portability.patch \
            "
 
 SRC_URI[md5sum] = "c9607d8495f16e98906e7ed2d9751a06"
Signature · 1 line
2.32.0