diff --git a/include/stddef.h b/include/stddef.h index ecc5eb94ce..bcd09d249b 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -65,7 +65,7 @@ * Reference: Opengroup.org */ -#define offsetof(a,b) ((size_t)(&(((a *)(0))->b))) +#define offsetof(type, member) ((size_t)(uintptr_t)&(((type *)0)->member)) /**************************************************************************** * Type Definitions