build: avoid struct fsxattr redefinition
authorJeffrey Bastian <jbastian@redhat.com>
Wed, 18 May 2016 17:40:54 +0000 (12:40 -0500)
committerEryu Guan <eguan@redhat.com>
Wed, 15 Jun 2016 07:28:46 +0000 (15:28 +0800)
commitca7c8bcbe851b2795357ce0137ead4199fe69808
tree6818a2fb597948d209af062902f03d6a9829c11d
parent2400133d8eec696af0c916ddecad32f3d697378e
build: avoid struct fsxattr redefinition

Linux kernel v4.5 defines 'struct fsxattr' in linux/fs.h [0] but
it's still defined in xfs/linux.h as a backup [1].  If the files are
included in the wrong order, the compiler will complain with a
redefinition error.  This patch moves linux/fs.h (and linux/magic.h)
before the xfs headers for the t_immutable.c and fsstress.c tests.

[0] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=334e580a6f97e
[1] http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfsprogs.git;a=blob;f=include/linux.h;h=cc0f70ceed72#l183

Signed-off-by: Jeffrey Bastian <jbastian@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
ltp/fsstress.c
src/t_immutable.c