diff --git a/src/util/macros.h b/src/util/macros.h index d79848ad997..c474d7571d7 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -204,7 +204,11 @@ do { \ * packed, to trade off performance for space. */ #ifdef HAVE_FUNC_ATTRIBUTE_PACKED -#define PACKED __attribute__((__packed__)) +# if defined(__MINGW32__) || defined(__MINGW64__) +# define PACKED __attribute__((gcc_struct,__packed__)) +# else +# define PACKED __attribute__((__packed__)) +# endif #else #define PACKED #endif