diff --git a/library/chacha20.c b/library/chacha20.c index 903f55f3b..d14a51e04 100644 --- a/library/chacha20.c +++ b/library/chacha20.c @@ -48,6 +48,11 @@ #if !defined(MBEDTLS_CHACHA20_ALT) +#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ + !defined(inline) && !defined(__cplusplus) +#define inline __inline +#endif + #define BYTES_TO_U32_LE( data, offset ) \ ( (uint32_t) data[offset] \ | (uint32_t) ( (uint32_t) data[( offset ) + 1] << 8 ) \ diff --git a/library/poly1305.c b/library/poly1305.c index bafe61380..e22d3afb6 100644 --- a/library/poly1305.c +++ b/library/poly1305.c @@ -44,6 +44,11 @@ #if !defined(MBEDTLS_POLY1305_ALT) +#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ + !defined(inline) && !defined(__cplusplus) +#define inline __inline +#endif + #define POLY1305_BLOCK_SIZE_BYTES ( 16U ) #define BYTES_TO_U32_LE( data, offset ) \