From 1f5a79312480bac45bc658946e16c4b1ce0e6586 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 3 Jul 2019 14:58:59 +0100 Subject: [PATCH] Use attribute always_inline only for GCC and ARM compiler --- include/mbedtls/ssl_internal.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index 0db867c82..f1186eaff 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -1724,7 +1724,13 @@ static inline unsigned int mbedtls_ssl_conf_get_ems_enforced( #endif /* MBEDTLS_SSL_CONF_SINGLE_SIG_HASH */ -__attribute__((always_inline)) static inline int mbedtls_ssl_pend_alert_message( +#if defined(__GNUC__) || defined(__arm__) +#define MBEDTLS_ALWAYS_INLINE __attribute__((always_inline)) +#else +#define MBEDTLS_ALWAYS_INLINE +#endif + +MBEDTLS_ALWAYS_INLINE static inline int mbedtls_ssl_pend_alert_message( mbedtls_ssl_context *ssl, unsigned char level, unsigned char message )