diff options
author | Khem Raj <raj.khem@gmail.com> | 2025-03-19 01:15:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-19 12:09:06 +0000 |
commit | 6bca4852a40e9ec63c49360fec1965c7db623306 (patch) | |
tree | fb3de11cd5eb2bd18285eb7244cc19159436210c /meta | |
parent | 05a300261e177e50b81bd72fa84767b766be34c8 (diff) | |
download | poky-6bca4852a40e9ec63c49360fec1965c7db623306.tar.gz |
e2fsprogs: Fix build failure with gcc 15
Backport a needed fix
(From OE-Core rev: baceb28924383729a445e2bf2a13c0a6115bc5c7)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch | 42 | ||||
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.1.bb | 1 |
2 files changed, 43 insertions, 0 deletions
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 0000000000..01ab9d5afb --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 72dcef02bee9924c4d5b3dc6e7ef4d07becebcc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rudi Heitbaum <rudi@heitbaum.com> | ||
3 | Date: Fri, 22 Nov 2024 12:36:32 +0000 | ||
4 | Subject: [PATCH] libext2fs: fix -std=c23 build failure | ||
5 | |||
6 | gcc-15 switched to -std=c23 by default: | ||
7 | |||
8 | https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 | ||
9 | |||
10 | As a result `e2fsprogs` fails the build so only typedef int bool | ||
11 | for __STDC_VERSION__ <= 201710L (C17) | ||
12 | |||
13 | ../../../lib/ext2fs/tdb.c:113:13: error: two or more data types in declaration specifiers | ||
14 | ../../../lib/ext2fs/tdb.c:113:1: warning: useless type name in empty declaration | ||
15 | 113 | typedef int bool; | ||
16 | | ^~~~~~~ | ||
17 | |||
18 | https://github.com/tytso/e2fsprogs/issues/202 | ||
19 | |||
20 | Upstream-Status: Backport [https://github.com/tytso/e2fsprogs/commit/49fd04d77b3244c6c6990be41142168eef373aef] | ||
21 | Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> | ||
22 | Link: https://lore.kernel.org/r/Z0B60JhdvT9bpSQ6@6f91903e89da | ||
23 | Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ||
24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
25 | --- | ||
26 | lib/ext2fs/tdb.c | 2 ++ | ||
27 | 1 file changed, 2 insertions(+) | ||
28 | |||
29 | diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c | ||
30 | index b07b2917..98dc95d8 100644 | ||
31 | --- a/lib/ext2fs/tdb.c | ||
32 | +++ b/lib/ext2fs/tdb.c | ||
33 | @@ -110,7 +110,9 @@ static char *rep_strdup(const char *s) | ||
34 | #endif | ||
35 | #endif | ||
36 | |||
37 | +#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L | ||
38 | typedef int bool; | ||
39 | +#endif | ||
40 | |||
41 | #include "tdb.h" | ||
42 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.1.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.1.bb index bd6ac92cb1..022b016f12 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.1.bb +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.1.bb | |||
@@ -4,6 +4,7 @@ SRC_URI += "file://remove.ldconfig.call.patch \ | |||
4 | file://run-ptest \ | 4 | file://run-ptest \ |
5 | file://ptest.patch \ | 5 | file://ptest.patch \ |
6 | file://mkdir_p.patch \ | 6 | file://mkdir_p.patch \ |
7 | file://0001-libext2fs-fix-std-c23-build-failure.patch \ | ||
7 | " | 8 | " |
8 | SRC_URI:append:class-native = " \ | 9 | SRC_URI:append:class-native = " \ |
9 | file://e2fsprogs-fix-missing-check-for-permission-denied.patch \ | 10 | file://e2fsprogs-fix-missing-check-for-permission-denied.patch \ |