diff mbox series

[psplash,1/2] psplash: Only define bool if using C standard older than C23

Message ID 20250318033858.2400370-1-raj.khem@gmail.com
State New
Headers show
Series [psplash,1/2] psplash: Only define bool if using C standard older than C23 | expand

Commit Message

Khem Raj March 18, 2025, 3:38 a.m. UTC
gcc-15 switched to -std=c23 by default:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212

only typedef int bool for __STDC_VERSION__ <= 201710L (C17)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 psplash.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/psplash.h b/psplash.h
index 1c42ec7..138e49d 100644
--- a/psplash.h
+++ b/psplash.h
@@ -37,7 +37,10 @@ 
 
 typedef uint8_t  uint8;
 typedef uint16_t uint16;
+
+#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L
 typedef int            bool;
+#endif
 
 #ifndef FALSE
 #define FALSE 0