1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-07 06:42:56 +03:00

Fix static inline linker issues

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman
2022-11-24 20:07:39 +00:00
parent 4b910c1ed1
commit 66433444fc
2 changed files with 8 additions and 4 deletions

View File

@@ -32,7 +32,7 @@
* *
* \param p pointer to 4 bytes of data * \param p pointer to 4 bytes of data
*/ */
static inline uint32_t mbedtls_get_unaligned_uint32( void const *p ) inline uint32_t mbedtls_get_unaligned_uint32( void const *p )
{ {
uint32_t r; uint32_t r;
memcpy( &r, p, 4 ); memcpy( &r, p, 4 );
@@ -46,7 +46,7 @@ static inline uint32_t mbedtls_get_unaligned_uint32( void const *p )
* \param p pointer to 4 bytes of data * \param p pointer to 4 bytes of data
* \param x data to write * \param x data to write
*/ */
static inline void mbedtls_put_unaligned_uint32( void *p, uint32_t x ) inline void mbedtls_put_unaligned_uint32( void *p, uint32_t x )
{ {
memcpy( p, &x, 4 ); memcpy( p, &x, 4 );
} }

View File

@@ -144,7 +144,11 @@ void (*mbedtls_test_hook_test_fail)( const char *, int, const char *);
#endif /* MBEDTLS_TEST_HOOKS */ #endif /* MBEDTLS_TEST_HOOKS */
/* /*
* Provide an external definition of mbedtls_xor so that the compiler * Provide external definitions of some inline functions so that the compiler
* has the option to not inline it * has the option to not inline them
*/ */
extern inline void mbedtls_xor( unsigned char *r, unsigned char const *a, unsigned char const *b, size_t n ); extern inline void mbedtls_xor( unsigned char *r, unsigned char const *a, unsigned char const *b, size_t n );
extern inline uint32_t mbedtls_get_unaligned_uint32( void const *p );
extern inline void mbedtls_put_unaligned_uint32( void *p, uint32_t x );