xfs
[Top] [All Lists]

Re: [PATCH v2 1/4] xfsprogs: Prefix LIST_... macros to XFS_LIST_...

To: Jan Tulak <jtulak@xxxxxxxxxx>
Subject: Re: [PATCH v2 1/4] xfsprogs: Prefix LIST_... macros to XFS_LIST_...
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 3 Aug 2015 09:42:50 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1437397018-12864-2-git-send-email-jtulak@xxxxxxxxxx>
References: <1437397018-12864-1-git-send-email-jtulak@xxxxxxxxxx> <1437397018-12864-2-git-send-email-jtulak@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jul 20, 2015 at 02:56:55PM +0200, Jan Tulak wrote:
> OS X has some conflicting LIST_ macros, so prefix the XFS ones.

What macros, and how do we get them included in the build? I
shouldn't need to go and use google to work out why a change is
beign made....

> Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
> ---
>  include/list.h  | 6 +++---
>  repair/phase6.c | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/list.h b/include/list.h
> index 3f087a4..7e9f748 100644
> --- a/include/list.h
> +++ b/include/list.h
> @@ -27,10 +27,10 @@ struct list_head {
>       struct list_head *prev;
>  };
>  
> -#define LIST_HEAD_INIT(name) { &(name), &(name) }
> +#define XFS_LIST_HEAD_INIT(name) { &(name), &(name) }
>  
> -#define LIST_HEAD(name) \
> -             struct list_head name = LIST_HEAD_INIT(name)
> +#define XFS_LIST_HEAD(name) \
> +             struct list_head name = XFS_LIST_HEAD_INIT(name)
>  
>  #define INIT_LIST_HEAD(list) list_head_init(list)
>  static inline void list_head_init(struct list_head *list)

This is supposed to match what is required for libxfs/ so we don't
have to modify the kernel code we bring across. Without knowing
exactly how we are including conflicting definitions from the OS X
include files, it's really hard to suggest other possible
solutions...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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