Use __builtin_offsetof instead of the macro thing

Otherwise the expression is not constant and we fail to build on some
compilers. Patch from OpenSUSE.

We've got to get rid of this lsb-build thing.
This commit is contained in:
David Benjamin 2011-03-30 20:26:42 -04:00
parent 673b42b9f2
commit 072df8ad81
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ extern "C" {
#endif
#define offsetof(TYPE,MEMBER) ((size_t)&((TYPE*)0)->MEMBER)
#define offsetof(TYPE,MEMBER) __builtin_offsetof(TYPE,MEMBER)
#if !defined(__cplusplus)