Skip to content

Commit 314866a

Browse files
committed
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/
1 parent c71c434 commit 314866a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/include/efivar/efivar-types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typedef struct {
2020
uint16_t c;
2121
uint16_t d;
2222
uint8_t e[6];
23-
} efi_guid_t __attribute__((__aligned__(1)));
23+
} efi_guid_t __attribute__((__aligned__(4)));
2424

2525
#if BYTE_ORDER == LITTLE_ENDIAN
2626
#define EFI_GUID(a,b,c,d,e0,e1,e2,e3,e4,e5) \

0 commit comments

Comments
 (0)