diff --git a/src/basic/macro.h b/src/basic/macro.h index b48d399097..78e4262e41 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -448,6 +448,8 @@ static inline int __coverity_check_and_return__(int condition) { #define char_array_0(x) x[sizeof(x)-1] = 0; +#define sizeof_field(struct_type, member) sizeof(((struct_type *) 0)->member) + /* Returns the number of chars needed to format variables of the * specified type as a decimal string. Adds in extra space for a * negative '-' prefix (hence works correctly on signed