X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=inline;f=include%2Fstddef.h;fp=include%2Fstddef.h;h=a5bb9ecc2539cdfaec4226dc36d53d59f34cd027;hb=a7c1f9727a099da0d4722d4cf81056acd205158b;hp=dbf5a4ae1fe987b9059fe2510171634c4db51bb6;hpb=b427c822655156f17d17cd00110ff5bc22299a38;p=musl 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 +#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