diff --git a/ta/ta.c b/ta/ta.c index d67568adfd..a4d3ac6052 100644 --- a/ta/ta.c +++ b/ta/ta.c @@ -13,18 +13,15 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include +#include +#include #include #include -#include -#include #define TA_NO_WRAPPERS #include "ta.h" -// Note: the actual minimum alignment is dictated by malloc(). It doesn't -// make sense to set this value higher than malloc's alignment. -#define MIN_ALIGN 16 - #if !defined(TA_MEMORY_DEBUGGING) #if !defined(NDEBUG) #define TA_MEMORY_DEBUGGING 1 @@ -52,6 +49,7 @@ struct ta_header { #define CANARY 0xD3ADB3EF +#define MIN_ALIGN _Alignof(max_align_t) union aligned_header { struct ta_header ta; // Make sure to satisfy typical alignment requirements