File Add-support-for-C23-gcc-15.patch of Package pdsh

From: Egbert Eich <eich@suse.com>
Date: Sun Mar 9 10:14:41 2025 +0100
Subject: Add support for C23 (gcc >= 15)
Patch-mainline: Not yet
Git-commit: ce57044b7b79758f1710e6f57df52cffe1f1425a
References: 

'true' and 'false' are proper keywords in C23.

Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
 src/common/macros.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/src/common/macros.h b/src/common/macros.h
index 3cab336..ea227ab 100644
--- a/src/common/macros.h
+++ b/src/common/macros.h
@@ -58,9 +58,11 @@
 
 #ifndef _BOOL_DEFINED
 #  define _BOOL_DEFINED
+# if __STDC_VERSION__ < 202311L
 #  if !defined (true) && !defined (false)
 typedef enum { false, true } bool;
 #  endif
+# endif
 #endif
 
 #endif                          /* !_MACROS_INCLUDED */
openSUSE Build Service is sponsored by