use __builtin_offsetof for gcc4 and superior, it avoids a gcc4 broken build with template use of offsetof()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20669 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b342ed59fb
commit
72b4b94081
@ -5,7 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
#include <null.h>
|
#include <null.h>
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ > 3
|
||||||
|
#define offsetof(type,member) __builtin_offsetof(type, member)
|
||||||
|
#else
|
||||||
#define offsetof(type,member) ((size_t)&((type*)0)->member)
|
#define offsetof(type,member) ((size_t)&((type*)0)->member)
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef long ptrdiff_t;
|
typedef long ptrdiff_t;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user