Fix some build breaks

This commit is contained in:
Justine Tunney 2021-09-04 02:29:57 -07:00
parent 27f7ffd4fd
commit a81192e0b9
5 changed files with 5 additions and 10 deletions

View file

@ -33,7 +33,7 @@ int32_t sys_fstatat(int32_t dirfd, const char *path, struct stat *st,
if (IsAsan() && !__asan_is_valid(path, 1)) return efault();
if (IsLinux()) {
_Static_assert(sizeof(*st) == sizeof(ms.linux), "assumption broken");
if (IsAsan() && !__asan_is_valid(st, sizeof(*st))) return efault();
if (IsAsan() && (st && !__asan_is_valid(st, sizeof(*st)))) return efault();
p = st;
} else if (st) {
p = &ms;