src/statx: fix undefined reference to xfstests_statx
PATCH 1/1 src/statx: fix undefined reference to xfstests_statx
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.
---
CC David Howells <[email protected]>, 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(-)
src/statx.h +2 -1
@@ -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 */
Signature · 1 line
2.14.4
Quoted 18 lines · Zorro Lang
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 toxfstests_statx' /tmp/cc3s96Dw.o: In functionget_reference':
/root/xfstests-dev/src/stat_test.c:301: undefined reference toxfstests_statx' /tmp/cc3s96Dw.o: In functionmain':
/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 2Due to glibc-headers-2.28 defines struct statx and all related things, include
STATX_TYPE. But xfstestssrc/statx.hwon't buildxfstests_statx()functionSTATX_TYPEhas been defined, that doesn't make sense.
Quoted 5 lines
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 <[email protected]>
Lu sent the same fix 2 days ago:
https://patchwork.kernel.org/patch/10558653/
Quoted 37 lines
---
CC David Howells <[email protected]>, the original author of
src/statx.h. For this change won't break his original design.Thanks,
Zorrosrc/statx.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)src/statx.h +2
-2@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Filipe David Manana, “Whether you think you can, or you think you can't — you're right.”
Quoted 23 lines · Filipe Manana
Quoted 22 lines · Zorro Lang
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 toxfstests_statx' /tmp/cc3s96Dw.o: In functionget_reference':
/root/xfstests-dev/src/stat_test.c:301: undefined reference toxfstests_statx' /tmp/cc3s96Dw.o: In functionmain':
/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 2Due to glibc-headers-2.28 defines struct statx and all related things, include
STATX_TYPE. But xfstestssrc/statx.hwon't buildxfstests_statx()functionSTATX_TYPEhas 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.
Quoted 5 lines
Quoted 1 line
Signed-off-by Zorro Lang <[email protected]>Lu sent the same fix 2 days ago:
OK, Great :)
Thanks,
Zorro
Quoted 50 lines
Quoted 39 lines
---
CC David Howells <[email protected]>, the original author of
src/statx.h. For this change won't break his original design.Thanks,
Zorrosrc/statx.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)src/statx.h +2
-2@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlSignature · 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html