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