+--- a/shared/idmap/shift_linux.go 2022-03-11 04:52:20.000000000 +0100
++++ b/shared/idmap/shift_linux.go 2022-11-22 09:18:23.513333279 +0100
+@@ -314,7 +314,7 @@
+ static int create_detached_idmapped_mount(const char *path)
+ {
+ __do_close int fd_tree = -EBADF, fd_userns = -EBADF;
+- struct lxc_mount_attr attr = {
++ struct mount_attr attr = {
+ .attr_set = MOUNT_ATTR_IDMAP,
+ .propagation = MS_SLAVE,
+
+--- a/lxd/include/syscall_wrappers.h 2022-11-22 09:10:03.053333289 +0100
++++ b/lxd/include/syscall_wrappers.h 2022-11-22 09:20:55.586666611 +0100
+@@ -11,7 +11,7 @@
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-
++#include <sys/mount.h>
+ #include "syscall_numbers.h"
+
+ #ifndef CLOSE_RANGE_UNSHARE
+@@ -27,7 +27,7 @@
+ return syscall(__NR_close_range, fd, max_fd, flags);
+ }
+
+-static inline int open_tree(int dfd, const char *filename, unsigned int flags)
++static inline int xopen_tree(int dfd, const char *filename, unsigned int flags)
+ {
+ return syscall(__NR_open_tree, dfd, filename, flags);
+ }
+@@ -42,13 +42,13 @@
+ __u64 userns_fd;
+ };
+
+-static inline int mount_setattr(int dfd, const char *path, unsigned int flags,
++static inline int xmount_setattr(int dfd, const char *path, unsigned int flags,
+ struct lxc_mount_attr *attr, size_t size)
+ {
+ return syscall(__NR_mount_setattr, dfd, path, flags, attr, size);
+ }
+
+-static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd,
++static inline int xmove_mount(int from_dfd, const char *from_pathname, int to_dfd,
+ const char *to_pathname, unsigned int flags)
+ {
+ return syscall(__NR_move_mount, from_dfd, from_pathname, to_dfd,
+--- a/lxd/main_checkfeature.go 2022-03-11 04:52:20.000000000 +0100
++++ b/lxd/main_checkfeature.go 2022-11-22 10:54:47.506666609 +0100
+@@ -563,7 +563,7 @@
+ static bool kernel_supports_idmapped_mounts(void)
+ {
+ __do_close int fd_devnull = -EBADF, fd_tree = -EBADF;
+- struct lxc_mount_attr attr = {
++ struct mount_attr attr = {
+ .attr_set = MOUNT_ATTR_IDMAP,
+
+ };
+--- a/lxd/main_nsexec.go 2022-03-11 04:52:20.000000000 +0100
++++ b/lxd/main_nsexec.go 2022-11-22 10:59:03.776666604 +0100
+@@ -298,7 +298,7 @@
+ int mount_detach_idmap(const char *path, int fd_userns)
+ {
+ __do_close int fd_tree = -EBADF;
+- struct lxc_mount_attr attr = {
++ struct mount_attr attr = {
+ .attr_set = MOUNT_ATTR_IDMAP,
+
+ };