diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index 40ede66d4a..daa386b769 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -5,7 +5,7 @@ #include #define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) -#define OFFSETOF(x,y) ((UINTN) &(((x*)0)->y)) +#define OFFSETOF(x,y) __builtin_offsetof(x,y) static inline const CHAR16 *yes_no(BOOLEAN b) { return b ? L"yes" : L"no";