Prepare for enabling -Wmacro-redefined. Signed-off-by: Bart Van Assche <bvanass...@acm.org> --- fsck/f2fs.h | 2 +- include/f2fs_fs.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/fsck/f2fs.h b/fsck/f2fs.h index eacfd42478b8..e5130ba19961 100644 --- a/fsck/f2fs.h +++ b/fsck/f2fs.h @@ -15,6 +15,7 @@ #include <unistd.h> #include <stdio.h> #include <stdbool.h> +#include <stddef.h> #include <errno.h> #include <fcntl.h> #include <string.h> @@ -37,7 +38,6 @@ typecheck(unsigned long long, b) && \ ((long long)((a) - (b)) > 0)) -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #define container_of(ptr, type, member) ({ \ const typeof(((type *)0)->member) * __mptr = (ptr); \ (type *)((char *)__mptr - offsetof(type, member)); }) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 60b6dfced74b..dd62bc89a926 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -19,6 +19,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stddef.h> #include <string.h> #include <time.h> #ifdef HAVE_CONFIG_H @@ -914,10 +915,6 @@ static_assert(sizeof(struct f2fs_extent) == 12, ""); #define F2FS_PIN_FILE 0x40 /* file should not be gced */ #define F2FS_COMPRESS_RELEASED 0x80 /* file released compressed blocks */ -#if !defined(offsetof) -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif - #define F2FS_EXTRA_ISIZE_OFFSET \ offsetof(struct f2fs_inode, i_extra_isize) #define F2FS_TOTAL_EXTRA_ATTR_SIZE \ _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel