]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: fix -std=c23 build failure
authorRudi Heitbaum <rudi@heitbaum.com>
Fri, 22 Nov 2024 12:36:32 +0000 (12:36 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Nov 2024 18:12:35 +0000 (13:12 -0500)
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

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Link: https://lore.kernel.org/r/Z0B60JhdvT9bpSQ6@6f91903e89da
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/tdb.c

index b07b2917fae2fce964adee6c8e8e8638dafd758c..98dc95d85130725f331faf680b7a9486a3655728 100644 (file)
@@ -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"