[LTP] [PATCH 1/2] statmount.h: add check for STATMOUNT_MNT_NS_ID
Cyril Hrubis
chrubis@suse.cz
Mon Sep 15 11:15:39 CEST 2025
Hi!
> > +/* Enable mnt_ns_id check when system struct statmount is not defined. */
> > +#if !defined(HAVE_STRUCT_STATMOUNT) && !defined(LTP_HAVE_STATMOUNT_MNT_NS_ID)
> > +#define LTP_HAVE_STATMOUNT_MNT_NS_ID 1
> > +#endif
On a second look this looks like you are working around the
fallback definition we have. But there is no configure check for
STATMOUNT_MNT_NS_ID that has to be added to configure.ac, we need
something as:
AC_CHECK_MEMBERS([struct statmount.mnt_ns_id],,,[#include <unistd.h>])
That would define HAVE_STRUCT_STATMOUNT_MNT_NS_ID if that field is
present in the system headers.
And then we can use that with:
#if !defined(HAVE_STRUCT_STATMOUNT) || defined(HAVE_STRUCT_STATMOUNT_MNT_NS_ID)
# define LTP_HAVE_STRUCT_STATMOUNT_MNT_NS_ID 1
#endif
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list