summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-08-23 11:21:38 -0700
committerEryu Guan <guaneryu@gmail.com>2021-08-29 21:05:45 +0800
commit90199d8061509a02d514dbdcc930928ce3fc8b1c (patch)
tree2a79ed3f2acc8b13c70a91bbe689439ddb3560c4 /configure.ac
parentf4660739feddf1d4717530a83c96f44135417fe0 (diff)
idmap: override btrfs_ioctl_vol_args_v2 if system header doesn't have subvolid
The struct btrfs_ioctl_vol_args_v2 in /usr/include/linux/btrfs.h on my system predates the inclusion of the "subvolid" field. This causes the following build failure: idmapped-mounts.c: In function 'btrfs_delete_subvolume_id': idmapped-mounts.c:9730:6: error: 'struct btrfs_ioctl_vol_args_v2' has no member named 'subvolid' 9730 | args.subvolid = subvolid; | ^ Since this source file contains its own more uptodate copy of that structure, add some more autoconf/cpp magic so that we can override the struct definition if the system header doesn't have the desired field. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Reviewed-by: Anju T Sudhakar<anju@linux.vnet.ibm.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4f9f672a..78e9d945 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,7 +77,7 @@ AC_CHECK_TYPES([struct btrfs_ioctl_ino_lookup_args], [], [], [[#include <linux/b
AC_CHECK_TYPES([struct btrfs_ioctl_ino_lookup_user_args], [], [], [[#include <linux/btrfs.h>]])
AC_CHECK_TYPES([struct btrfs_ioctl_get_subvol_rootref_args], [], [], [[#include <linux/btrfs.h>]])
AC_CHECK_HEADERS([linux/btrfs.h linux/btrfs_tree.h])
-
+AC_CHECK_MEMBERS([struct btrfs_ioctl_vol_args_v2.subvolid], [], [], [[#include <linux/btrfs.h>]])
AC_CONFIG_HEADER(include/config.h)
AC_CONFIG_FILES([include/builddefs])