From patchwork Thu Apr 3 03:50:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nguyen Dat Tho X-Patchwork-Id: 14036737 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73669C3600C for ; Thu, 3 Apr 2025 04:21:31 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1u0C53-0008Gp-Mt; Thu, 03 Apr 2025 04:21:29 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1u0C52-0008Gi-LH for linux-f2fs-devel@lists.sourceforge.net; Thu, 03 Apr 2025 04:21:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GtsgyMd5k5S+RCVW953wEU0S2j9d9y2UJk6iVF/zlrc=; b=TMXcrG5JX2fUArE0senKND1YCj ufBiI038J7qip+Uof3wtJmkEDprvMw3617D6MtMY0CCFc1bvS67/Z9xR3O8GV0xqU447dLttziB35 KMNFfFreU9U8BPK5PbMF7faVpuHrAbmo3hTN9ERgioq8I6f9nbd0jMrttT+u7SoykszU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=GtsgyMd5k5S+RCVW953wEU0S2j9d9y2UJk6iVF/zlrc=; b=a v5f45qPXA2NVVZAaKIAqRYobB2Bjmn9fK5t7APw039uCl6vVvk4mGb0nSOJsP2qq/PcFKp+5e5EhL GQ/05WApEGDtyzqgDfv0A9VdlxHDn25/O5KY7bqfczWPegBFE009ApGxwdgzJ6elMCbMOjwFSJyuN xqlgkhvSTOvt+340=; Received: from lgeamrelo12.lge.com ([156.147.23.52] helo=lgeamrelo11.lge.com) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1u0C4l-0006Ke-KR for linux-f2fs-devel@lists.sourceforge.net; Thu, 03 Apr 2025 04:21:27 +0000 Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.52 with ESMTP; 3 Apr 2025 12:51:04 +0900 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: thond2009@gmail.com Received: from unknown (HELO tho3-nguyen-weboscsm.bee-live.svc.cluster.local) (10.185.60.101) by 156.147.1.121 with ESMTP; 3 Apr 2025 12:51:04 +0900 X-Original-SENDERIP: 10.185.60.101 X-Original-MAILFROM: thond2009@gmail.com From: Nguyen Dat Tho To: linux-f2fs-devel@lists.sourceforge.net Date: Thu, 3 Apr 2025 12:50:57 +0900 Message-Id: <20250403035057.304454-1-thond2009@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Headers-End: 1u0C4l-0006Ke-KR Subject: [f2fs-dev] [PATCH] include/f2fs_fs.h: fix -std=c23 build failure X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nguyen Dat Tho Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Nguyen Dat Tho gcc-15 switched to -std=c23 by default: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 As a result `f2fs-tools` fails as below, so only typedef u8 bool for __STDC_VERSION__ <= 201710L (C17) In file included from ../../git/lib/libf2fs_zoned.c:11: ../../git/include/f2fs_fs.h:107:25: error: two or more data types in declaration specifiers 107 | typedef u8 bool; | ^~~~ ../../git/include/f2fs_fs.h:107:1: warning: useless type name in empty declaration 107 | typedef u8 bool; Signed-off-by: Nguyen Dat Tho --- include/f2fs_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index f890634..1be77f1 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -103,7 +103,7 @@ typedef uint16_t u16; typedef uint8_t u8; typedef u32 block_t; typedef u32 nid_t; -#ifndef bool +#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L typedef u8 bool; #endif typedef unsigned long pgoff_t;