aports/main/libmilter/gcc-15.patch
2025-10-05 23:56:16 +00:00

29 lines
920 B
Diff

diff --git a/include/libmilter/mfapi.h b/include/libmilter/mfapi.h
index 3bb4c1d..e1ff25a 100644
--- a/include/libmilter/mfapi.h
+++ b/include/libmilter/mfapi.h
@@ -93,14 +93,16 @@ typedef int sfsistat;
# include <stdbool.h>
#else /* SM_CONF_STDBOOL_H */
# ifndef __cplusplus
-# ifndef bool
-# ifndef __bool_true_false_are_defined
+# if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L)
+# ifndef bool
+# ifndef __bool_true_false_are_defined
typedef int bool;
-# define false 0
-# define true 1
-# define __bool_true_false_are_defined 1
-# endif /* ! __bool_true_false_are_defined */
-# endif /* bool */
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+# endif /* ! __bool_true_false_are_defined */
+# endif /* bool */
+# endif /* !C++ and not C23 */
# endif /* ! __cplusplus */
#endif /* SM_CONF_STDBOOL_H */