From 064061fa50d55bc416daab1db2cf7a9c41267439 Mon Sep 17 00:00:00 2001 From: meator Date: Fri, 10 Jan 2025 14:22:25 +0100 Subject: [PATCH] efivar-types.h: fix alignment of efi_guid_t The current alignment of 1 can lead to a lot of Walign-mismatch warnings in C++. This behavior also doesn't seem to be up to spec, as evidenced by a similar change made in the Linux ARM kernel: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190108152829.11579-1-ard.biesheuvel@linaro.org/ Signed-off-by: meator --- src/include/efivar/efivar-types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/efivar/efivar-types.h b/src/include/efivar/efivar-types.h index 34b333fa..25a8178f 100644 --- a/src/include/efivar/efivar-types.h +++ b/src/include/efivar/efivar-types.h @@ -20,7 +20,7 @@ typedef struct { uint16_t c; uint16_t d; uint8_t e[6]; -} efi_guid_t __attribute__((__aligned__(1))); +} efi_guid_t __attribute__((__aligned__(4))); #if BYTE_ORDER == LITTLE_ENDIAN #define EFI_GUID(a,b,c,d,e0,e1,e2,e3,e4,e5) \