* [PATCH] tdb: fix -std=c23 build failure
@ 2024-11-22 12:36 Rudi Heitbaum
2024-12-05 15:52 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Rudi Heitbaum @ 2024-11-22 12:36 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4, rudi
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;
| ^~~~~~~
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
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"
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-05 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22 12:36 [PATCH] tdb: fix -std=c23 build failure Rudi Heitbaum
2024-12-05 15:52 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox