linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: root <yo@cristianrodriguez.net>
To: linux-btrfs@vger.kernel.org
Cc: "Cristian Rodríguez" <crrodriguez@opensuse.org>
Subject: [PATCH btrfs-progs] kerncompat.h: remove offsetof redefinition
Date: Wed, 26 Jun 2013 00:14:39 -0400	[thread overview]
Message-ID: <1372220079-17236-1-git-send-email-root@xps9000.cristianrodriguez.net> (raw)

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


             reply	other threads:[~2013-06-26  4:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26  4:14 root [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-26  4:16 [PATCH btrfs-progs] kerncompat.h: remove offsetof redefinition Cristian Rodríguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372220079-17236-1-git-send-email-root@xps9000.cristianrodriguez.net \
    --to=yo@cristianrodriguez.net \
    --cc=crrodriguez@opensuse.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).