]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: ifdef STATX_MNT_ID_UNIQUE
authorKarel Zak <kzak@redhat.com>
Tue, 20 Aug 2024 19:10:17 +0000 (21:10 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Jan 2025 12:57:42 +0000 (13:57 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/utils.c

index e5e37662921efc6838c4ae2539bcb75857be359f..7d8116402a1c21ddc1e708fe93be9bbcbc868338 100644 (file)
@@ -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