Syscall getdents(2) has been historically mistaken the pointer in the
loop. This influences aarch64 python3.12 built by cosmopolitan
/superconfigure thus been found out.
Signed-off-by: Meowthink <meowthink@googlemail.com>
---
bsd-user/freebsd/os-stat.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/bsd-user/freebsd/os-stat.h b/bsd-user/freebsd/os-stat.h
index 3bdc66aa98..5e14331e0b 100644
--- a/bsd-user/freebsd/os-stat.h
+++ b/bsd-user/freebsd/os-stat.h
@@ -475,6 +475,7 @@ static inline abi_long do_freebsd11_getdents(abi_long arg1,
de->d_reclen = tswap16(reclen);
de->d_fileno = tswap32(de->d_fileno);
len -= reclen;
+ de = (struct freebsd11_dirent *)((void *)de + reclen);
}
}
return ret;
base-commit: de278e54aefed143526174335f8286f7437d20be
--
2.42.0