tdb: fix -std=c23 build failure
PATCH 1/1 tdb: 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;
| ^~~~~~~Signed-off-by Rudi Heitbaum <[email protected]>
--- lib/ext2fs/tdb.c | 2 ++ 1 file changed, 2 insertions(+)
lib/ext2fs/tdb.c +2 -0
@@ -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"
Signature · 1 line
2.43.0
Theodore Ts'o
AppliedQuoted 8 lines · Rudi Heitbaum
gcc-15 switched to -std=c23 by default:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212As a result
e2fsprogsfails the build so only typedef int bool for__STDC_VERSION__<= 201710L (C17)[...]
Applied, thanks!
[1/1] tdb: fix -std=c23 build failure
commit: 49fd04d77b3244c6c6990be41142168eef373aef
Best regards,
Signature · 1 line
Theodore Ts'o <[email protected]>