Skip to content

Commit

Permalink
efivar-types.h: fix alignment of efi_guid_t
Browse files Browse the repository at this point in the history
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/[email protected]/
  • Loading branch information
meator committed Jan 10, 2025
1 parent c71c434 commit 314866a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/efivar/efivar-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 314866a

Please sign in to comment.