stddef.h: Use a round-about cast in the definition of offsetof() to avoid warnings on machines with 64 bit addresses and when size_t is less than 64-bits.
This commit is contained in:
parent
375419eaf2
commit
25ab59bf80
|
@ -65,7 +65,7 @@
|
||||||
* Reference: Opengroup.org
|
* 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
|
* Type Definitions
|
||||||
|
|
Loading…
Reference in New Issue