Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Rudi Heitbaum <rudi@heitbaum.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, rudi@heitbaum.com
Subject: [PATCH] tdb: fix -std=c23 build failure
Date: Fri, 22 Nov 2024 12:36:32 +0000	[thread overview]
Message-ID: <Z0B60JhdvT9bpSQ6@6f91903e89da> (raw)

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


             reply	other threads:[~2024-11-22 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 12:36 Rudi Heitbaum [this message]
2024-12-05 15:52 ` [PATCH] tdb: fix -std=c23 build failure Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z0B60JhdvT9bpSQ6@6f91903e89da \
    --to=rudi@heitbaum.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox