From ce680690de5ba4f6863573322bf7310df3a769e3 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Fri, 6 Sep 2024 12:26:55 +0200 Subject: [PATCH] Fix Windows build with MSVC 19.41 (#2065) Include `cmath` instead of `math.h` in C++ mode under MSVC, to avoid build errors inside the header. Ideally we would not condition this on `_MSC_VER`, but issue 1833 currently prevents doing so. Signed-off-by: Sven van Haastregt --- test_common/harness/compat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_common/harness/compat.h b/test_common/harness/compat.h index a42f2917..e8a3047e 100644 --- a/test_common/harness/compat.h +++ b/test_common/harness/compat.h @@ -112,6 +112,8 @@ int feclearexcept(int excepts); #if defined(__INTEL_COMPILER) #include +#elif __cplusplus && defined(_MSC_VER) +#include #else #include #endif