From b30356f25335ebf3e993f8fdd854656fc103a1d7 Mon Sep 17 00:00:00 2001 From: Anthony Iliopoulos Date: Wed, 13 May 2026 21:30:39 +0200 Subject: [PATCH] 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" --- libfrog/statmount.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) { -- 2.47.3