Merge pull request #10731 from AmyChan-Intel/mbedtls-3.6

library/alignment.h: Fix 'MBEDTLS_GCC_VERSION' is not defined error
This commit is contained in:
David Horstmann 2026-06-30 09:34:49 +00:00 committed by GitHub
commit a065f0b0db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
Bugfix
* library/alignment.h: Fix 'MBEDTLS_GCC_VERSION' is not defined error

View File

@ -297,7 +297,7 @@ static inline void mbedtls_put_unaligned_uint64(void *p, uint64_t x)
/*
* Detect GCC built-in byteswap routines
*/
#if defined(__GNUC__)
#if defined(MBEDTLS_COMPILER_IS_GCC)
#if MBEDTLS_GCC_VERSION >= 40800
#define MBEDTLS_BSWAP16 __builtin_bswap16
#endif
@ -305,7 +305,7 @@ static inline void mbedtls_put_unaligned_uint64(void *p, uint64_t x)
#define MBEDTLS_BSWAP32 __builtin_bswap32
#define MBEDTLS_BSWAP64 __builtin_bswap64
#endif
#endif /* defined(__GNUC__) */
#endif /* defined(MBEDTLS_COMPILER_IS_GCC) */
/*
* Detect Clang built-in byteswap routines