[LTP] [PATCH] statx: fix compile errors with glibc<2.28

Cyril Hrubis chrubis@suse.cz
Wed Sep 19 13:40:47 CEST 2018


Hi!
> > > glibc 2.28 has shipped with a wrapper for the statx() system call.
> > > Currently the build is broken against it, because sys/stat.h suddenly
> > > declares all the same types that lapi/stat.h does.  Fix it by taking
> > > the sys/stat.h ones if glibc>=2.28.
> > >
> > >   include/lapi/stat.h:26:8: error: redefinition of ???struct
> > statx_timestamp???
> > >   include/lapi/stat.h:73:8: error: redefinition of ???struct statx???
> >
> > What's wrong with the configure checks we do have?
> >
> > See m4/ltp-statx.m4:
> >
> > AC_CHECK_TYPES([struct statx],,,[[#include <sys/stat.h>]])
> > AC_CHECK_TYPES([struct statx_timestamp],,,[[#include <sys/stat.h>]])
> >
> > That should check exactly if these structures are defined and export the
> > HAVE_STRUCT_* macros?
> >
> 

Check the config.log somewhere there is a test program that failed the
compilation that tests for the struct statx and struct statx_timestamp.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list