From a8068667d676b95565358bf15ef1dea1a55c18cd Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Mon, 21 Sep 2026 15:16:32 -0500 Subject: [PATCH] Fix stdbool.h error when using GCC 15 See issue #240 for detailed error messages, work around, and fix --- src/utils/ncmpidump/ncmpidump.h | 2 +- test/common/testutils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/ncmpidump/ncmpidump.h b/src/utils/ncmpidump/ncmpidump.h index 1d1604f543..84246f7767 100644 --- a/src/utils/ncmpidump/ncmpidump.h +++ b/src/utils/ncmpidump/ncmpidump.h @@ -20,7 +20,7 @@ typedef bool boolean; #else typedef int boolean; -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L +#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L) enum {false=0, true=1}; #endif #endif diff --git a/test/common/testutils.h b/test/common/testutils.h index 38d6f8f9ec..b444d2ece5 100644 --- a/test/common/testutils.h +++ b/test/common/testutils.h @@ -22,7 +22,7 @@ typedef bool boolean; #else typedef int boolean; -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L +#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L) enum {false=0, true=1}; #endif #endif