From: Khem Raj Date: Sun, 17 Aug 2025 20:50:31 +0000 (+0200) Subject: e2fsprogs: Fix build failure with gcc 15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5a7d9aa471e05d7cdb3127eaec3dba1b15bf72d;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git e2fsprogs: Fix build failure with gcc 15 Backport a needed fix Signed-off-by: Khem Raj Signed-off-by: Richard Purdie Signed-off-by: Martin Jansa Signed-off-by: Steve Sakoman --- diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch new file mode 100644 index 00000000000..01ab9d5afb5 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch @@ -0,0 +1,42 @@ +From 72dcef02bee9924c4d5b3dc6e7ef4d07becebcc6 Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum +Date: Fri, 22 Nov 2024 12:36:32 +0000 +Subject: [PATCH] libext2fs: fix -std=c23 build failure + +gcc-15 switched to -std=c23 by default: + + https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 + +As a result `e2fsprogs` fails the build so only typedef int bool +for __STDC_VERSION__ <= 201710L (C17) + + ../../../lib/ext2fs/tdb.c:113:13: error: two or more data types in declaration specifiers + ../../../lib/ext2fs/tdb.c:113:1: warning: useless type name in empty declaration + 113 | typedef int bool; + | ^~~~~~~ + +https://github.com/tytso/e2fsprogs/issues/202 + +Upstream-Status: Backport [https://github.com/tytso/e2fsprogs/commit/49fd04d77b3244c6c6990be41142168eef373aef] +Signed-off-by: Rudi Heitbaum +Link: https://lore.kernel.org/r/Z0B60JhdvT9bpSQ6@6f91903e89da +Signed-off-by: Theodore Ts'o +Signed-off-by: Khem Raj +--- + lib/ext2fs/tdb.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c +index b07b2917..98dc95d8 100644 +--- a/lib/ext2fs/tdb.c ++++ b/lib/ext2fs/tdb.c +@@ -110,7 +110,9 @@ static char *rep_strdup(const char *s) + #endif + #endif + ++#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L + typedef int bool; ++#endif + + #include "tdb.h" + diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb index 940b47c155d..02888545274 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb @@ -4,6 +4,7 @@ SRC_URI += "file://remove.ldconfig.call.patch \ file://run-ptest \ file://ptest.patch \ file://mkdir_p.patch \ + file://0001-libext2fs-fix-std-c23-build-failure.patch \ " SRC_URI:append:class-native = " \ file://e2fsprogs-fix-missing-check-for-permission-denied.patch \