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>
This commit is contained in:
Cristian Rodríguez 2013-06-26 00:16:43 -04:00 committed by David Sterba
parent 97a276aebe
commit 9d3a4cb00c
1 changed files with 1 additions and 6 deletions

View File

@ -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); \