Print this page
3373 gcc >= 4.5 concerns about offsetof()
*** 524,534 ****
/*
* Yet another standard thing that is not standard ...
*/
#ifndef offsetof
! #define offsetof(s, m) ((size_t)(&((s *)0)->m))
#endif
/*
* Build a 32bit rdc_set structure and copyout to the user level.
*/
--- 524,538 ----
/*
* Yet another standard thing that is not standard ...
*/
#ifndef offsetof
! #if defined(__GNUC__)
! #define offsetof(s, m) __builtin_offsetof(s, m)
! #else
! #define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
! #endif
#endif
/*
* Build a 32bit rdc_set structure and copyout to the user level.
*/