[libc][sys/stat] kernel_statx.h should use UAPI header instead of manually redefining kernel types
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The current implementation of the statx syscall wrapper in kernel_statx.h manually redefines `struct statx_timestamp`, `struct statx_buf`, and `STATX_BASIC_STATS_MASK` inside an anonymous namespace, duplicating definitions that already exist in the kernel header ``.
This question about if using existing UAPI or bootstrap itself was raised while I was developing another PR: #182700. That PR implements `ftok`, which also need to wrap statx syscall, however, was encouraged to use the UAPI headers instead.
There is an inconsistency for the same wrappers but implemented in a different approach. Since I was told that the current approach is to use UAPI header, I can launch another PR to fix this inconsistency.
Contributor guide
Assessment
This issue has not been assessed yet.