Skip to contentSkip to conversation

xfsdump: don't redeclare offsetoff

PATCH In review Christoph Hellwig 2 participants 2 messages Nov 25, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsdump: don't redeclare offsetoff

Don't redeclare offsetof, we already include <stddef.h> to get it and modern gcc will complain about the redeclaration.

xfsdump/common/getdents.c +0 -2
Index: xfs-cmds/xfsdump/common/getdents.c
===================================================================
@@ -72,8 +72,6 @@ extern int __have_no_getdents64;
 # endif
 #endif
 
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-
 
 /* For Linux we need a special version of this file since the
    definition of `struct dirent' is not the same for the kernel and

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 11 lines · Christoph Hellwig

Don't redeclare offsetof, we already include <stddef.h> to get it and modern gcc will complain about the redeclaration.

Index: xfs-cmds/xfsdump/common/getdents.c
===================================================================

xfsdump/common/getdents.c extern int __have_no_getdents64; · line 76

Quoted 5 lines
xfsdump/common/getdents.c +0 -2
@@ -72,8 +72,6 @@ extern int __have_no_getdents64;
 # endif
 #endif
 
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-

ACK. I'd noticed this too, thanks.

-Eric

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs