From: Anthony Iliopoulos Date: Wed, 13 May 2026 19:30:39 +0000 (+0200) Subject: libfrog: add fallback stubs for libfrog_statmount and fstatmount X-Git-Tag: v7.0.1~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b30356f25335ebf3e993f8fdd854656fc103a1d7;p=xfsprogs-dev.git libfrog: add fallback stubs for libfrog_statmount and fstatmount Add stubs for libfrog_statmount and fstatmount to enable compilation of xfs_healer on systems that lack listmount support. Without these stubs, statmount.c is not compiled, causing compilation errors due to missing definitions. The stubs allow xfs_healer to fall back to walking the mount table in userspace. Signed-off-by: Anthony Iliopoulos Reviewed-by: "Darrick J. Wong" --- diff --git a/libfrog/statmount.h b/libfrog/statmount.h index b6f13388..13aaad3a 100644 --- a/libfrog/statmount.h +++ b/libfrog/statmount.h @@ -98,11 +98,23 @@ struct statmount { int libfrog_listmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t *cursor, uint64_t *mnt_ids, size_t nr_mnt_ids); +#ifdef HAVE_LISTMOUNT int libfrog_statmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t statmount_flags, struct statmount *smbuf, size_t smbuf_size); - int libfrog_fstatmount(int fd, uint64_t statmount_flags, struct statmount *smbuf, size_t smbuf_size); +#else +static inline int libfrog_statmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t statmount_flags, + struct statmount *smbuf, size_t smbuf_size) +{ + return -ENOSYS; +} +static inline int libfrog_fstatmount(int fd, uint64_t statmount_flags, + struct statmount *smbuf, size_t smbuf_size) +{ + return -ENOSYS; +} +#endif static inline size_t libfrog_statmount_sizeof(size_t strings_bytes) {