X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;h=8ae6535d0de57ed1878bf42b98d37163fadccb49;hb=8dbd7d838dc2276e5a25057c76c2e219e1d2661b;hp=0e11d3c7ac2f8179ea98bda74293c91158d6b2c2;hpb=8b4d39f23672f23df21eb163373a5e21720ec3ce;p=lttng-tools.git diff --git a/src/common/macros.h b/src/common/macros.h index 0e11d3c7a..8ae6535d0 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -78,6 +78,8 @@ void *zmalloc(size_t len) #define LTTNG_HIDDEN __attribute__((visibility("hidden"))) #endif +#define member_sizeof(type, field) sizeof(((type *) 0)->field) + /* * lttng_strncpy returns 0 on success, or nonzero on failure. * It checks that the @src string fits into @dst_len before performing