From: Karel Zak Date: Mon, 24 Apr 2023 12:12:14 +0000 (+0200) Subject: include/mount-api-utils: make fallback more portable X-Git-Tag: v2.39~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26788963f5dd9bec9a1bdda98896791c61dfad92;p=thirdparty%2Futil-linux.git include/mount-api-utils: make fallback more portable Addresses: https://github.com/util-linux/util-linux/issues/2186 Signed-off-by: Karel Zak --- diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h index 43144221cb..9044e1cd9d 100644 --- a/include/mount-api-utils.h +++ b/include/mount-api-utils.h @@ -116,6 +116,7 @@ static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd #endif #ifndef HAVE_STRUCT_MOUNT_ATTR +# ifndef MOUNT_ATTR_SIZE_VER0 /* For case mount.h comes from a place invisible for autotools/meson */ # include struct mount_attr { uint64_t attr_set; @@ -123,6 +124,7 @@ struct mount_attr { uint64_t propagation; uint64_t userns_fd; }; +# endif #endif #if !defined(HAVE_MOUNT_SETATTR) && defined(SYS_mount_setattr) @@ -134,6 +136,7 @@ static inline int mount_setattr(int dfd, const char *path, unsigned int flags, #endif #ifndef HAVE_ENUM_FSCONFIG_COMMAND +# ifndef FSOPEN_CLOEXEC /* For case mount.h comes from a place invisible for autotools/meson */ enum fsconfig_command { FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ @@ -144,6 +147,7 @@ enum fsconfig_command { FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ }; +# endif #endif #if !defined(HAVE_FSCONFIG) && defined(SYS_fsconfig)