diff options
-rw-r--r-- | src/include/stddef.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h index 3bbf914246..f87c65f089 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -32,9 +32,13 @@ typedef unsigned int wint_t; #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#if !defined(__clang__) #define check_member(structure, member, offset) _Static_assert( \ offsetof(struct structure, member) == offset, \ "`struct " #structure "` offset for `" #member "` is not " #offset ) +#else +#define check_member(structure, member, offset) +#endif /** * container_of - cast a member of a structure out to the containing structure |