<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 19, 2018 at 3:48 PM, Cyril Hrubis <span dir="ltr"><<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
<span class="gmail-">> glibc 2.28 has shipped with a wrapper for the statx() system call.<br>
> Currently the build is broken against it, because sys/stat.h suddenly<br>
> declares all the same types that lapi/stat.h does.  Fix it by taking<br>
> the sys/stat.h ones if glibc>=2.28.<br>
> <br>
</span>>   include/lapi/stat.h:26:8: error: redefinition of ???struct statx_timestamp???<br>
>   include/lapi/stat.h:73:8: error: redefinition of ???struct statx???<br>
<br>
What's wrong with the configure checks we do have?<br>
<br>
See m4/ltp-statx.m4:<br>
<br>
AC_CHECK_TYPES([struct statx],,,[[#include <sys/stat.h>]])<br>
AC_CHECK_TYPES([struct statx_timestamp],,,[[#include <sys/stat.h>]])<br>
<br>
That should check exactly if these structures are defined and export the<br>
<span class="gmail_default" style="font-size:small"></span>HAVE_STRUCT_* macros?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small"><div class="gmail_default" style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Confusing...</div></div><br></div><div><div class="gmail_default" style="font-size:small">It does not works for me. I checked the LTP "include/config.h" file after performing ./configure, </div><div class="gmail_default" style="font-size:small">the <span class="gmail_default" style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"></span><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">HAVE_STRUCT_* macros undefined.</span></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"># cat include/config.h |grep -i statx</div><div class="gmail_default">/* Define to 1 if you have the `statx' function. */</div><div class="gmail_default">#define HAVE_STATX 1</div><div class="gmail_default">/* Define to 1 if the system has the type `struct statx'. */</div><div class="gmail_default">/* #undef HAVE_STRUCT_STATX */</div><div class="gmail_default">/* Define to 1 if the system has the type `struct statx_timestamp'. */</div><div class="gmail_default">/* #undef HAVE_STRUCT_STATX_TIMESTAMP */</div><div class="gmail_default" style="font-size:small"></div></div><div class="gmail_default" style="font-size:small">And I also confirmed the struct statx has been defined in "bits/statx.h" which was included by "sys/stat.h" on my platform(glibc>=2.28).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"># grep "struct statx" /usr/include/bits/statx.h </div><div class="gmail_default">struct statx_timestamp</div><div class="gmail_default">struct statx</div><div class="gmail_default">  struct statx_timestamp stx_atime;</div><div class="gmail_default">  struct statx_timestamp stx_btime;</div><div class="gmail_default">  struct statx_timestamp stx_ctime;</div><div class="gmail_default">  struct statx_timestamp stx_mtime;</div><div class="gmail_default">           unsigned int __mask, struct statx *__restrict __buf)</div><div><br></div></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div>
</div></div></div></div>