зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 786437: Add glibc version check in Linux sandbox test process
Add a glibc version check in test process. Use fstat instead of __fxstat in ubuntu 22.04
This commit is contained in:
Родитель
fe5a6759ec
Коммит
3b7be63260
|
@ -65,9 +65,13 @@ int FileDescriptorAccessesFullyResolvesPath()
|
|||
testFile.append("/realDir/symlink.txt");
|
||||
int fd = open("symlinkDir/symlink.txt", O_RDONLY);
|
||||
struct stat sb;
|
||||
|
||||
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 33)
|
||||
// Use __fxtat as representative for a "file descriptor event"
|
||||
__fxstat(1, fd, &sb);
|
||||
#else
|
||||
fstat(fd, &sb);
|
||||
#endif
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче