From 4518ba2a2b03b6c8071f51b3bee360b933fcb441 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Mon, 26 May 2025 08:07:41 -0600 Subject: [PATCH] RedfishPkg: Don't define bool type if building in C23 mode In C23 bool is a built-in type, so it's not necessary to typedef bool in RedfishCrtLib.h. Signed-off-by: Rebecca Cran --- RedfishPkg/Include/Library/RedfishCrtLib.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/RedfishPkg/Include/Library/RedfishCrtLib.h b/RedfishPkg/Include/Library/RedfishCrtLib.h index 0c51a03d0e..f2aefbbf5c 100644 --- a/RedfishPkg/Include/Library/RedfishCrtLib.h +++ b/RedfishPkg/Include/Library/RedfishCrtLib.h @@ -69,14 +69,17 @@ // // Basic types mapping // -typedef UINTN size_t; -typedef INTN ssize_t; -typedef INT32 time_t; -typedef INT32 int32_t; -typedef UINT32 uint32_t; -typedef UINT16 uint16_t; -typedef UINT8 uint8_t; -typedef BOOLEAN bool; +typedef UINTN size_t; +typedef INTN ssize_t; +typedef INT32 time_t; +typedef INT32 int32_t; +typedef UINT32 uint32_t; +typedef UINT16 uint16_t; +typedef UINT8 uint8_t; +// In C23, bool is a built-in type +#if __STDC_VERSION__ < 202311L +typedef BOOLEAN bool; +#endif #define true (1 == 1) #define false (1 == 0)