All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: guard fsxattr definition for newer kernels
@ 2016-02-09 17:40 Eric Sandeen
  2016-02-09 19:55 ` Dave Chinner
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Sandeen @ 2016-02-09 17:40 UTC (permalink / raw)
  To: xfs

After 334e580,
fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion

the file include/linux/fs.h now defines struct fsxattr.

It defines FS_IOC_FSGETXATTR as well, so use that to wrap
our local definition, and skip it if the kernel is providing
it so that we don't get multiple definitions.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Should the kernel also #define HAVE_FSXATTR to help existing
xfsprogs-devel installations?

(And what if headers are included in the other order?  Should
we try to guard on the kernel side or no?)

diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h
index d8b733a..f4858df 100644
--- a/libxfs/xfs_fs.h
+++ b/libxfs/xfs_fs.h
@@ -37,8 +37,10 @@ struct dioattr {
 
 /*
  * Structure for XFS_IOC_FSGETXATTR[A] and XFS_IOC_FSSETXATTR.
+ * If FS_IOC_FSGETXATTR is defined, the kernel is now providing
+ * this structure definition.
  */
-#ifndef HAVE_FSXATTR
+#if (!defined(HAVE_FSXATTR) && !defined(FS_IOC_FSGETXATTR))
 struct fsxattr {
 	__u32		fsx_xflags;	/* xflags field value (get/set) */
 	__u32		fsx_extsize;	/* extsize field value (get/set)*/

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-02-09 22:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 17:40 [PATCH] xfsprogs: guard fsxattr definition for newer kernels Eric Sandeen
2016-02-09 19:55 ` Dave Chinner
2016-02-09 19:57   ` Eric Sandeen
2016-02-09 21:10     ` Dave Chinner
2016-02-09 21:27       ` Eric Sandeen
2016-02-09 21:44         ` Dave Chinner
2016-02-09 21:45           ` Eric Sandeen
2016-02-09 22:37             ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.