forked from OSchip/llvm-project
[tsan] Make __fxstat code path glibc only
This fixes Linux musl build after D118423.
This commit is contained in:
parent
e1e17a6489
commit
da2a16f702
|
@ -1554,16 +1554,16 @@ TSAN_INTERCEPTOR(int, __fxstat, int version, int fd, void *buf) {
|
|||
#endif
|
||||
|
||||
TSAN_INTERCEPTOR(int, fstat, int fd, void *buf) {
|
||||
#if SANITIZER_FREEBSD || SANITIZER_MAC || SANITIZER_ANDROID || SANITIZER_NETBSD
|
||||
SCOPED_TSAN_INTERCEPTOR(fstat, fd, buf);
|
||||
if (fd > 0)
|
||||
FdAccess(thr, pc, fd);
|
||||
return REAL(fstat)(fd, buf);
|
||||
#else
|
||||
#if SANITIZER_GLIBC
|
||||
SCOPED_TSAN_INTERCEPTOR(__fxstat, 0, fd, buf);
|
||||
if (fd > 0)
|
||||
FdAccess(thr, pc, fd);
|
||||
return REAL(__fxstat)(0, fd, buf);
|
||||
#else
|
||||
SCOPED_TSAN_INTERCEPTOR(fstat, fd, buf);
|
||||
if (fd > 0)
|
||||
FdAccess(thr, pc, fd);
|
||||
return REAL(fstat)(fd, buf);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue