diff --git a/osdep/compiler.h b/osdep/compiler.h index d25f0cd1e4..7c9f859f3a 100644 --- a/osdep/compiler.h +++ b/osdep/compiler.h @@ -17,5 +17,10 @@ #define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (gnu_printf, a1, a2))) #endif +#if __STDC_VERSION__ >= 201112L +#include +#else +#define alignof(x) (offsetof(struct {char unalign_; x u;}, u)) +#endif #endif