[PATCH] xfsdump: don't redeclare offsetoff

Eric Sandeen sandeen at sandeen.net
Tue Nov 25 10:01:01 CST 2008


Christoph Hellwig wrote:
> Don't redeclare offsetof, we already include <stddef.h> to get it and
> modern gcc will complain about the redeclaration.
> 
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> 
> Index: xfs-cmds/xfsdump/common/getdents.c
> ===================================================================
> --- xfs-cmds.orig/xfsdump/common/getdents.c	2008-11-13 18:45:11.000000000 +0100
> +++ xfs-cmds/xfsdump/common/getdents.c	2008-11-13 18:45:18.000000000 +0100
> @@ -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



More information about the xfs mailing list