libc: fix build in C23 mode

GCC 15 defaults to C23, in which bool, true, and false are keywords.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Message-ID: <20250419114403.879376-1-yselkowi@redhat.com>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
diff --git a/lib/libc/include/stdbool.h b/lib/libc/include/stdbool.h
index 5b7d36a..0e0f8c6 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