From 9eadad2068cc64aed0b2e109af6a00a371bb8c11 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 7 Aug 2024 12:04:16 +0200 Subject: [PATCH] btstack_bool: workaround for Visual Studio --- src/btstack_bool.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/btstack_bool.h b/src/btstack_bool.h index 89f2c88ff..5e1d398f6 100644 --- a/src/btstack_bool.h +++ b/src/btstack_bool.h @@ -57,6 +57,12 @@ # endif #endif /* __STDC__ */ +// Detecting C99 in Visual Studio requires to disable Microsoft Extensions (/Za) which causes other issues +// Workaround: if MSC, assume stdbool.h exists, which is true for Visual Studio 2022 +#ifdef _MSC_VER +#define PREDEF_STANDARD_C_1999 +#endif + // define boolean type - required for MISRA-C 2012 Essential Type System #ifdef PREDEF_STANDARD_C_1999