Print this page
3373 gcc >= 4.5 concerns about offsetof()
*** 5641,5651 ****
/*
* Yet another standard thing that is not standard ...
*/
#ifndef offsetof
! #define offsetof(s, m) ((size_t)(&((s *)0)->m))
#endif
static int
rdc_status(void *arg, int mode, rdc_config_t *uparms, spcs_s_info_t kstatus)
{
--- 5641,5655 ----
/*
* 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
static int
rdc_status(void *arg, int mode, rdc_config_t *uparms, spcs_s_info_t kstatus)
{