Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Deal with glibc228 #75
This breaks compatibility with glibc-2.27:
This is bad, meson does not detect
And in the configuration log I can see:
So you ask for statx in sys/stat.h but include linux/stat.h. That seems to be the problem.
I have extended your patch a bit:
If I apply that, compilation succeeds against glibc-2.27 and linux-headers-4.17. Could you please check whether this is still true when building against glibc-2.28 and adapt your commit accordingly?
Thanks for considering the PR. I have varied your variation slightly - does it work with glibc-2.27? I only have 2.23 and 2.28 systems to test with - both build OK here with this (Take 2) version of the patch.
In the meson log, I see statx not detected with 2.23; detected with 2.28 (as it should be). We can't have any unconditional linux/stat.h or sys/linux.h included with glibc-2.28 so I put them inside your new #if !HAVE_STRUCT_STATX_IN_SYS_STAT_H && !HAVE_STRUCT_STATX_IN_LINUX_STAT_H condition, so they should be included for other glibc versions.
Oh, you were faster than my edit...
First of all: Well done! I'll check and merge tonight (and backport to the stable-branches where appropriate.)
The includes aren't necessary, so you can remove both #include lines. Enabling them unconditionally was a mistake of mine. (A stupid thinking error to be honest).
It is only necessary to declare the structs, the headers aren't needed in missing.h. And that should be true for any glibc version.