xfs
[Top] [All Lists]

Re: [PATCH] dmapi: Fix a build warning

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH] dmapi: Fix a build warning
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 12 Feb 2010 16:23:59 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <201002122056.o1CKuruK025550@xxxxxxxxxxxxxxxxxxxxxx>
References: <201002122056.o1CKuruK025550@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Fri, Feb 12, 2010 at 02:56:53PM -0600, Alex Elder wrote:
> Fix a build warning.
> 
> Signed-off-by: Alex Elder <aelder@xxxxxxx>
> 
> ---
>  libdm/getdents.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Index: dmapi/libdm/getdents.c
> ===================================================================
> --- dmapi.orig/libdm/getdents.c
> +++ dmapi/libdm/getdents.c
> @@ -72,7 +72,9 @@ extern int __have_no_getdents64;
>  # endif
>  #endif
>  
> -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
> +#ifndef offsetof
> +# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
> +#endif /* ! offsetof */

Looks fine, but as we really should have offsetoff we might just
kill it entirely.

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>