[LTP] [PATCH v2] statmount.h: add check for STATMOUNT_MNT_NS_ID

Cyril Hrubis chrubis@suse.cz
Fri Sep 26 10:04:14 CEST 2025


Hi!
> > +/* Enable STATMOUNT_MNT_NS_ID check for struct statmount. */
> > +#if!defined(HAVE_STRUCT_STATMOUNT) || defined(HAVE_STRUCT_STATMOUNT_MNT_NS_ID)
> > +#define LTP_HAVE_STRUCT_STATMOUNT_MNT_NS_ID 1
> > +#endif
> 
> This is not a good practice, better to avoid defining LTP_* wrappers, 
> since we already have the HAVE_* variables defined by autoconf.

This has to be unfortunately there because the field is present if we
are using lapi fallback or if we have new enough system headers. So
either we open code the ifdefs in the test, or define the macro like
this.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list