From 39760d6e23efb3056874702624c002e2abf626e3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 20 Aug 2024 21:10:17 +0200 Subject: [PATCH] libmount: ifdef STATX_MNT_ID_UNIQUE Signed-off-by: Karel Zak --- libmount/src/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libmount/src/utils.c b/libmount/src/utils.c index e5e376629..7d8116402 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -285,6 +285,7 @@ static int get_mnt_id( int fd, const char *path, *id = sx.stx_mnt_id; } if (uniq_id) { +# ifdef STATX_MNT_ID_UNIQUE errno = 0; rc = statx(fd, path ? path : "", flags, STATX_MNT_ID_UNIQUE, &sx); @@ -294,6 +295,9 @@ static int get_mnt_id( int fd, const char *path, if (rc) return rc; *uniq_id = sx.stx_mnt_id; +# else + return -ENOSYS; +# endif } return 0; #else -- 2.47.3