From: Emilio G. Cota Date: Wed, 8 Jun 2016 18:55:19 +0000 (-0400) Subject: compiler.h: add QEMU_ALIGNED() to enforce struct alignment X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=911a4d2215b05267b16925503218f49d607c6b29;p=qemu.git compiler.h: add QEMU_ALIGNED() to enforce struct alignment Reviewed-by: Sergey Fedorov Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Message-Id: <1465412133-3029-2-git-send-email-cota@braap.org> Signed-off-by: Richard Henderson --- diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 8f1cc7ba67..b64f899870 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -41,6 +41,8 @@ # define QEMU_PACKED __attribute__((packed)) #endif +#define QEMU_ALIGNED(X) __attribute__((aligned(X))) + #ifndef glue #define xglue(x, y) x ## y #define glue(x, y) xglue(x, y)