* [PATCH] xfsdump: don't redeclare offsetoff
@ 2008-11-25 10:55 Christoph Hellwig
2008-11-25 16:01 ` Eric Sandeen
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2008-11-25 10:55 UTC (permalink / raw)
To: xfs
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@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)
-
/* 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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] xfsdump: don't redeclare offsetoff
2008-11-25 10:55 [PATCH] xfsdump: don't redeclare offsetoff Christoph Hellwig
@ 2008-11-25 16:01 ` Eric Sandeen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2008-11-25 16:01 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
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@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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-25 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25 10:55 [PATCH] xfsdump: don't redeclare offsetoff Christoph Hellwig
2008-11-25 16:01 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox