toybox: Fix build with glibc 2.36+
PATCH 1/1 toybox: Fix build with glibc 2.36+
Signed-off-by Khem Raj <[email protected]>
---
...oid-glibc-and-linux-mount.h-conflict.patch | 32 +++++++++++++++++++
.../{toybox_0.8.7.bb => toybox_0.8.8.bb} | 3 +-
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-core/toybox/toybox/0001-portability-Avoid-glibc-and-linux-mount.h-conflict.patch
rename meta-oe/recipes-core/toybox/{toybox_0.8.7.bb => toybox_0.8.8.bb} (95%)meta-oe/recipes-core/toybox/toybox/0001-portability-Avoid-glibc-and-linux-mount.h-conflict.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 89000d9cb226cd864fa247f2428c9eaf7f414882 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sun, 14 Aug 2022 10:02:15 -0700 +Subject: [PATCH] portability: Avoid glibc and linux mount.h conflict + +With glibc 2.36+ linux/mount.h> and <sys/mount.h> headers are +no longer directly compatible + +Upstream-Status: Submitted [https://github.com/landley/toybox/pull/364] +Signed-off-by: Khem Raj <[email protected]> +--- + lib/portability.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/portability.h b/lib/portability.h +index 4de547a..24481ab 100644 +--- a/lib/portability.h ++++ b/lib/portability.h +@@ -179,8 +179,12 @@ void *memmem(const void *haystack, size_t haystack_length, + #define SWAP_LE64(x) (x) + #endif + +-// Linux headers not listed by POSIX or LSB ++// Glibc 2.36 sys/mount.h conflicts with linux/mount.h ++// See https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E ++#ifndef _LINUX_MOUNT_H + #include <sys/mount.h> ++#endif ++// Linux headers not listed by POSIX or LSB + #ifdef __linux__ + #include <sys/statfs.h> + #include <sys/swap.h>
meta-oe/recipes-core/toybox/toybox_0.8.8.bb renamed from meta-oe/recipes-core/toybox/toybox_0.8.7.bb +2 -1
@@ -8,8 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=78659a599b9325da368f2f1eb88f19c7" inherit cml1 update-alternatives SRC_URI = "http://www.landley.net/toybox/downloads/${BPN}-${PV}.tar.gz \ + file://0001-portability-Avoid-glibc-and-linux-mount.h-conflict.patch \ " -SRC_URI[sha256sum] = "b508bf336f82cb0739b77111f945931d1a143b5a53905cb753cd2607cfdd1494" +SRC_URI[sha256sum] = "dafd41978d40f02a61cf1be99a2b4a25812bbfb9c3157e679ee7611202d6ac58" SECTION = "base"
Signature · 1 line
2.37.2