[libc] Enable linux directory entries syscalls in riscv64
authorMikhail R. Gadelha <mikhail@igalia.com>
Thu, 4 May 2023 21:34:01 +0000 (18:34 -0300)
committerMikhail R. Gadelha <mikhail@igalia.com>
Thu, 4 May 2023 22:07:16 +0000 (19:07 -0300)
commit4c9c1a4e4f854b2a4891813b2b1d7e1079a52a62
treeb1cd6849bb9360455ff02405f982451fd001667d
parent8052c1e6ebbd993439006bd996bd34b9e8d32f57
[libc] Enable linux directory entries syscalls in riscv64

This patch updates the struct dirent to be on par with glibc (by adding
a missing d_type member) and update the readdir call to use SYS_getdents64
instead of SYS_getdents.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D147738
libc/config/linux/riscv64/entrypoints.txt
libc/config/linux/riscv64/headers.txt
libc/include/llvm-libc-types/struct_dirent.h
libc/src/__support/File/CMakeLists.txt
libc/src/__support/File/dir.cpp
libc/src/__support/File/linux_dir.cpp