Print this page
3373 gcc >= 4.5 concerns about offsetof()

*** 55,65 **** #define VS_ACCESS_UNDEFINED 0 #define VS_ACCESS_ALLOW 1 /* return 0 */ #define VS_ACCESS_DENY 2 /* return EACCES */ #define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C)) ! #define offsetof(s, m) (size_t)(&(((s *)0)->m)) /* global variables - tunable via /etc/system */ uint32_t vs_reqs_max = VS_REQS_DEFAULT; /* max scan requests */ uint32_t vs_nodes_max = VS_NODES_DEFAULT; /* max in-progress scan requests */ uint32_t vs_workers = VS_WORKERS_DEFAULT; /* max workers send reqs to vscand */ --- 55,69 ---- #define VS_ACCESS_UNDEFINED 0 #define VS_ACCESS_ALLOW 1 /* return 0 */ #define VS_ACCESS_DENY 2 /* return EACCES */ #define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C)) ! #if defined(__GNUC__) ! #define offsetof(s, m) __builtin_offsetof(s, m) ! #else ! #define offsetof(s, m) ((size_t)(&(((s *)0)->m))) ! #endif /* global variables - tunable via /etc/system */ uint32_t vs_reqs_max = VS_REQS_DEFAULT; /* max scan requests */ uint32_t vs_nodes_max = VS_NODES_DEFAULT; /* max in-progress scan requests */ uint32_t vs_workers = VS_WORKERS_DEFAULT; /* max workers send reqs to vscand */