NetBSD: add kinfo_file, kinfo_pcb structures and related constants by antoncxx · Pull Request #4985 · rust-lang/libc (original) (raw)
Description
This PR extends NetBSD support with updates to kernel information structures and file descriptor types.
1. Added kinfo_pcb
- Constants:
PCB_SLOPPCB_ALL
2. kinfo_file structure
- Contants
KERN_FILE_BYFILEKERN_FILE_BYPIDKERN_FILESLOP
3. File descriptor types
DTYPE_VNODEDTYPE_SOCKETDTYPE_PIPEDTYPE_MISCDTYPE_CRYPTODTYPE_MQUEUEDTYPE_SEMDTYPE_EVENTFDDTYPE_TIMERFD
Sources
Checklist
- Relevant tests in
libc-test/semverhave been updated - No placeholder or unstable values like
*LASTor*MAXare
included (see #3131) - Tested locally (
cd libc-test && cargo test --target mytarget);
especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated
Of all the file descriptor types, I’ve been having trouble with DTYPE_MEMFD. Even though it exists in the NetBSD source code, the corresponding header on an actual installation seems to be missing this definition. I’m not sure how to handle this properly—whether to ignore it during tests or not include it at all.