diff --git a/src/include/stddef.h b/src/include/stddef.h index 8e69545c..c91a103f 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -10,8 +10,8 @@ FILE_LICENCE ( GPL2_ONLY ); #define NULL ((void *)0) #undef offsetof -#ifdef __compiler_offsetof -#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) +#if ( defined ( __GNUC__ ) && ( __GNUC__ > 3 ) ) +#define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) #else #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif