On Thu, Aug 9, 2018 at 4:21 PM, Zorro Lang <zlang@xxxxxxxxxx> wrote: > xfstests build fails after glibc updated to 2.28: > > /tmp/cc3s96Dw.o: In function `main': > /root/xfstests-dev/src/stat_test.c:690: undefined reference to `xfstests_statx' > /tmp/cc3s96Dw.o: In function `get_reference': > /root/xfstests-dev/src/stat_test.c:301: undefined reference to `xfstests_statx' > /tmp/cc3s96Dw.o: In function `main': > /root/xfstests-dev/src/stat_test.c:642: undefined reference to `xfstests_statx' > collect2: error: ld returned 1 exit status > gmake[2]: *** [Makefile:82: stat_test] Error 1 > gmake[1]: *** [include/buildrules:31: src] Error 2 > make: *** [Makefile:53: default] Error 2 > > Due to glibc-headers-2.28 defines struct statx and all related > things, include STATX_TYPE. But xfstests src/statx.h won't build > xfstests_statx() function STATX_TYPE has been defined, that doesn't > make sense. > > If all statx things has been defined by glibc, we can skip xfstests > internal statx definition, but xfstests_statx() function is still > needed, because it's called by other programs. > > Signed-off-by: Zorro Lang <zlang@xxxxxxxxxx> Lu sent the same fix 2 days ago: https://patchwork.kernel.org/patch/10558653/ > --- > > CC David Howells <dhowells@xxxxxxxxxx>, the original author of src/statx.h. > For this change won't break his original design. > > Thanks, > Zorro > > src/statx.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/statx.h b/src/statx.h > index 5d58208a..f6aaafd6 100644 > --- a/src/statx.h > +++ b/src/statx.h > @@ -160,6 +160,8 @@ struct statx { > > #define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */ > > +#endif /* STATX_TYPE */ > + > static inline > int xfstests_statx(int dfd, const char *filename, unsigned flags, > unsigned int mask, struct statx *buffer) > @@ -172,5 +174,4 @@ int xfstests_statx(int dfd, const char *filename, unsigned flags, > #endif > } > > -#endif /* STATX_TYPE */ > #endif /* STATX_H */ > -- > 2.14.4 > > -- > To unsubscribe from this list: send the line "unsubscribe fstests" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Filipe David Manana, “Whether you think you can, or you think you can't — you're right.” -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html