From defe10df528f513ecafe02f01b24744b45be2499 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 12 Apr 2021 17:31:39 +0100 Subject: [PATCH] Add compatibility macro for the inline keyword in error.h MSVC is not fully compliant with C99 where the 'inline' keyword is defined. Add a macro to define an alternative for non-compliant compilers. Signed-off-by: Chris Jones --- include/mbedtls/error.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h index 49c312082..3d8a5eac0 100644 --- a/include/mbedtls/error.h +++ b/include/mbedtls/error.h @@ -30,6 +30,11 @@ #include +#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ + !defined(inline) && !defined(__cplusplus) +#define inline __inline +#endif + /** * Error code layout. *