diff options
Diffstat (limited to 'include/qemu/compiler.h')
-rw-r--r-- | include/qemu/compiler.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 9f76269..5843812 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -64,6 +64,8 @@ (type *) ((char *) __mptr - offsetof(type, member));}) #endif +#define sizeof_field(type, field) sizeof(((type *)0)->field) + /* Convert from a base type to a parent type, with compile time checking. */ #ifdef __GNUC__ #define DO_UPCAST(type, field, dev) ( __extension__ ( { \ |