1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-08 20:58:20 +03:00

efi: add poor man's offsetof() implementation

This commit is contained in:
Lennart Poettering 2018-06-21 18:49:52 +02:00
parent d10ba83a1b
commit b73acaed42

View File

@ -5,6 +5,7 @@
#include <efilib.h>
#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";