X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;h=8ae6535d0de57ed1878bf42b98d37163fadccb49;hb=f8f3885cc52af9d3c951da78989d6f4a25270411;hp=0e11d3c7ac2f8179ea98bda74293c91158d6b2c2;hpb=de7e372efecc2cf51921f2ac5a657337e04a39d3;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