[LTP] [PATCH] configure.ac: Add check for STATMOUNT_MNT_NS_ID

Jack Morgan jmorgan@naotchy.com
Fri Sep 26 04:54:08 CEST 2025


mnt_ns_id was removed from struct statmount in newer kernels.
This check determines whether the headers have this field or not.

Signed-off-by: Jack Morgan <jmorgan@naotchy.com>
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index d4dd13033..0480f46ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,8 @@ AC_CHECK_TYPES([struct cachestat],,,[#include <sys/mman.h>])
 # Defined in <linux/mount.h>, but include/lapi/mount.h includes <sys/mount.h> */
 AC_CHECK_TYPES([struct mnt_id_req],,,[#include <sys/mount.h>])
 AC_CHECK_TYPES([struct statmount],,,[#include <sys/mount.h>])
+AC_CHECK_MEMBERS([struct statmount.mnt_ns_id],,,[#include <unistd.h>
+#include <linux/mount.h>])
 
 AC_CHECK_TYPES([struct pidfd_info],,,[#include <sys/pidfd.h>])
 AC_CHECK_TYPES([struct file_attr],,,[#include <linux/fs.h>])
-- 
2.51.0




More information about the ltp mailing list