From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 15 Jan 2026 16:12:25 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgP1N-001dPm-2x for lore@lore.pengutronix.de; Thu, 15 Jan 2026 16:12:25 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vgP1N-0007ur-5p; Thu, 15 Jan 2026 16:12:25 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vgP10-0007bM-2r; Thu, 15 Jan 2026 16:12:02 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgP10-000m3w-1q; Thu, 15 Jan 2026 16:12:01 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1vgP0z-00000000y2Q-3aVa; Thu, 15 Jan 2026 16:12:01 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Thu, 15 Jan 2026 16:12:01 +0100 Message-ID: <20260115151201.230779-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251214171838.114312-1-l.stach@pengutronix.de> References: <20251214171838.114312-1-l.stach@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] memedit: fix C23 compatibility X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Lucas Stach Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as ca4334f2bb8b35079a6f5a4d9e1ec54c333ea6a2. Michael [sent from post-receive hook] On Thu, 15 Jan 2026 16:12:01 +0100, Lucas Stach wrote: > So it can be built with compilers that default to the > newer C standard. > > Signed-off-by: Lucas Stach > Message-Id: <20251214171838.114312-1-l.stach@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch b/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch > new file mode 100644 > index 000000000000..5ba25a6da9ff > --- /dev/null > +++ b/patches/memedit-0.9/0001-use-stdbool.h-instead-of-rolling-our-own.patch > @@ -0,0 +1,36 @@ > +From: Lucas Stach > +Date: Sun, 14 Dec 2025 18:12:57 +0100 > +Subject: [PATCH] use stdbool.h instead of rolling our own > + > +With C23 bool is now a proper keyword, so we can not use > +the check if bool is defined to gate our own fallback. > + > +Use stdbool.h instead to have bool types across different > +compiler versions. > + > +Signed-off-by: Lucas Stach > +--- > + memedit_parser.h | 8 +------- > + 1 file changed, 1 insertion(+), 7 deletions(-) > + > +diff --git a/memedit_parser.h b/memedit_parser.h > +index c5db019b7cde..bed7544a789e 100644 > +--- a/memedit_parser.h > ++++ b/memedit_parser.h > +@@ -14,15 +14,9 @@ > + ** > + ******************************************************************************/ > + > ++#include > + #include > + > +-#ifndef bool > +-typedef enum bool_t > +-{ > +- false = 0, true > +-} bool; > +-#endif > +- > + /* customized structure for command line parameters */ > + struct arg_t > + { > diff --git a/patches/memedit-0.9/series b/patches/memedit-0.9/series > new file mode 100644 > index 000000000000..4c98424f3381 > --- /dev/null > +++ b/patches/memedit-0.9/series > @@ -0,0 +1,4 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-use-stdbool.h-instead-of-rolling-our-own.patch > +# 84c619bd32bb289e17dd64b996d9ffb8 - git-ptx-patches magic