* [PATCH btrfs-progs] kerncompat.h: remove offsetof redefinition
@ 2013-06-26 4:14 root
0 siblings, 0 replies; 2+ messages in thread
From: root @ 2013-06-26 4:14 UTC (permalink / raw)
To: linux-btrfs; +Cc: Cristian Rodríguez
From: Cristian Rodríguez <crrodriguez@opensuse.org>
Must use the version provided by the compiler in stddef.h header
---
kerncompat.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kerncompat.h b/kerncompat.h
index 9c116b4..6b4b4ba 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); \
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH btrfs-progs] kerncompat.h: remove offsetof redefinition
@ 2013-06-26 4:16 Cristian Rodríguez
0 siblings, 0 replies; 2+ messages in thread
From: Cristian Rodríguez @ 2013-06-26 4:16 UTC (permalink / raw)
To: linux-btrfs; +Cc: Cristian Rodríguez
Must use the version provided by the compiler in stddef.h header
---
kerncompat.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kerncompat.h b/kerncompat.h
index 9c116b4..6b4b4ba 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); \
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-26 4:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26 4:16 [PATCH btrfs-progs] kerncompat.h: remove offsetof redefinition Cristian Rodríguez
-- strict thread matches above, loose matches on Subject: below --
2013-06-26 4:14 root
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).