diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2013-06-26 00:16:43 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-08-09 14:32:32 +0200 |
commit | 9d3a4cb00c156077784d0f113c2d733488c6c79e (patch) | |
tree | df1ccbe8276d8b090cf701da603d877467c5f342 /kerncompat.h | |
parent | 97a276aebea6eec73bbeb4b35f7ab195c7b2fa36 (diff) |
btrfs-progs: kerncompat.h: remove offsetof redefinition
Must use the version provided by the compiler in stddef.h header
Signed-off-by: Cristian RodrÃguez <crrodriguez@opensuse.org>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'kerncompat.h')
-rw-r--r-- | kerncompat.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kerncompat.h b/kerncompat.h index 9c116b4f..6b4b4ba1 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -26,6 +26,7 @@ #include <endian.h> #include <byteswap.h> #include <assert.h> +#include <stddef.h> #ifndef READ #define READ 0 @@ -234,12 +235,6 @@ static inline long IS_ERR(const void *ptr) #define BUG_ON(c) assert(!(c)) #define WARN_ON(c) assert(!(c)) -#undef offsetof -#ifdef __compiler_offsetof -#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) -#else -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ |