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

Cyril Hrubis chrubis@suse.cz
Wed Sep 19 09:48:21 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?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list