use _Alignof(max_align_t) instead of sizeof(max_align_t)

Fixes compilation on nieche architectures where
_Alignof(max_align_t) != sizeof(max_align_t) like i686.
This commit is contained in:
Pascal Kuthe 2023-01-31 19:06:26 +01:00
parent 8ee3e3fb41
commit 8648393846
No known key found for this signature in database
GPG Key ID: D715E8655AE166A6
1 changed files with 1 additions and 6 deletions

View File

@ -41,12 +41,7 @@ typedef struct {
} max_align_t;
#endif
#ifdef _MSC_VER
#define MAX_ALIGN 8
#else
#define MAX_ALIGN sizeof(max_align_t)
#endif
#define MAX_ALIGN _Alignof(max_align_t)
#ifndef _MSC_VER
#define ALIGN(pow) __attribute__((aligned(pow)))