flist.h: replace offsetof macros by stddef.h include
authorOmri Mor <omor1@asu.edu>
Sat, 20 May 2017 08:55:34 +0000 (01:55 -0700)
committerOmri Mor <omor1@asu.edu>
Sat, 20 May 2017 08:55:34 +0000 (01:55 -0700)
Signed-off-by: Omri Mor <omor1@asu.edu>
flist.h

diff --git a/flist.h b/flist.h
index b4fe6e6..2ca3d77 100644 (file)
--- a/flist.h
+++ b/flist.h
@@ -2,13 +2,7 @@
 #define _LINUX_FLIST_H
 
 #include <stdlib.h>
-
-#undef offsetof
-#ifdef __compiler_offsetof
-#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
-#else
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
+#include <stddef.h>
 
 #define container_of(ptr, type, member) ({                     \
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \