Linux\'s stddef.h defines offsetof() as:
offsetof()
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
whereas the Wik
The standard does not require the NULL pointer to evaluate to the bit pattern 0 but can evaluate to a platform specific value.
Doing the subtraction guarantees that when converted to an integer value, NULL is 0.