From 90c8ac22054822e7ef481f6aca27860dd3c05252 Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Tue, 31 Oct 2023 23:27:24 +0000 Subject: [PATCH] Add case for MSVC Signed-off-by: Dave Rodgman --- library/common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/common.h b/library/common.h index 7652e56859..fe4d213992 100644 --- a/library/common.h +++ b/library/common.h @@ -330,8 +330,13 @@ static inline void mbedtls_xor_no_simd(unsigned char *r, #endif #endif #if !defined(MBEDTLS_ASSUME) +#if defined(_MSC_VER) +/* Supported by MSVC since VS 2005 */ +#define MBEDTLS_ASSUME(x) __assume(x) +#else #define MBEDTLS_ASSUME(x) do { } while (0) #endif +#endif #if defined(__GNUC__) && !defined(__ARMCC_VERSION) && !defined(__clang__) \ && !defined(__llvm__) && !defined(__INTEL_COMPILER)