From: Karel Zak Date: Wed, 21 Aug 2024 08:56:50 +0000 (+0200) Subject: libmount: use __unused__ for dummy get_mnt_id() X-Git-Tag: v2.42-start~97^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef33030c1afb065fb6e96dae34a212a1ee428ca6;p=thirdparty%2Futil-linux.git libmount: use __unused__ for dummy get_mnt_id() Signed-off-by: Karel Zak --- diff --git a/libmount/src/utils.c b/libmount/src/utils.c index 7d8116402..a09037372 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -266,10 +266,10 @@ int mnt_is_readonly(const char *path) return 0; } +#if defined(HAVE_STATX) && defined(HAVE_STRUCT_STATX) && defined(HAVE_STRUCT_STATX_STX_MNT_ID) static int get_mnt_id( int fd, const char *path, uint64_t *uniq_id, int *id) { -#if defined(HAVE_STATX) && defined(HAVE_STRUCT_STATX) && defined(HAVE_STRUCT_STATX_STX_MNT_ID) int rc; struct statx sx = { 0 }; int flags = AT_STATX_DONT_SYNC | AT_NO_AUTOMOUNT; @@ -300,10 +300,16 @@ static int get_mnt_id( int fd, const char *path, # endif } return 0; -#else +} +#else /* HAVE_STATX && HAVE_STRUCT_STATX && AVE_STRUCT_STATX_STX_MNT_ID */ +static int get_mnt_id( int fd __attribute__((__unused__)), + const char *path __attribute__((__unused__)), + uint64_t *uniq_id __attribute__((__unused__)), + int *id __attribute__((__unused__))) +{ return -ENOSYS; -#endif } +#endif int mnt_id_from_fd(int fd, uint64_t *uniq_id, int *id) {