[SLOF] [PATCH slof] libc: fix build in C23 mode
Yaakov Selkowitz
yselkowi at redhat.com
Sat Apr 19 21:44:03 AEST 2025
GCC 15 defaults to C23, in which bool, true, and false are keywords.
Signed-off-by: Yaakov Selkowitz <yselkowi at redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
---
This should be a common breakage but I have not managed google
a common solution for this, what do others do?
---
lib/libc/include/stdbool.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libc/include/stdbool.h b/lib/libc/include/stdbool.h
index 5b7d36a7effb..0e0f8c682ec4 100644
--- a/lib/libc/include/stdbool.h
+++ b/lib/libc/include/stdbool.h
@@ -13,7 +13,7 @@
#ifndef _STDBOOL_H
#define _STDBOOL_H
-#ifndef __cplusplus
+#if !defined(__cplusplus) && __STDC_VERSION__ < 202311L
typedef enum { false = 0, true } bool;
#endif
--
2.49.0
More information about the SLOF
mailing list