diff options
Diffstat (limited to 'include/stddef.h')
-rw-r--r-- | include/stddef.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/stddef.h b/include/stddef.h index dbf5a4ae..a5bb9ecc 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -14,6 +14,10 @@ #include <bits/alltypes.h> +#if __GNUC__ > 3 +#define offsetof(type, member) __builtin_offsetof(type, member) +#else #define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 )) +#endif #endif |