From: Lennart Poettering Date: Thu, 21 Jun 2018 16:49:52 +0000 (+0200) Subject: efi: add poor man's offsetof() implementation X-Git-Tag: v240~522^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b73acaed42c85709ec0e9bc5b6c4511cba40a6ff;p=platform%2Fupstream%2Fsystemd.git efi: add poor man's offsetof() implementation --- diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index 8a3e052..3e6e610 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -5,6 +5,7 @@ #include #define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) +#define OFFSETOF(x,y) ((UINTN) &(((x*)0)->y)) static inline const CHAR16 *yes_no(BOOLEAN b) { return b ? L"yes" : L"no";