Skip to content

Comments

Extended NetBSD API#4985

Open
antoncxx wants to merge 1 commit intorust-lang:mainfrom
antoncxx:netbsd-ext
Open

Extended NetBSD API#4985
antoncxx wants to merge 1 commit intorust-lang:mainfrom
antoncxx:netbsd-ext

Conversation

@antoncxx
Copy link

@antoncxx antoncxx commented Feb 19, 2026

Description

This PR extends NetBSD support with updates to kernel information structures and file descriptor types.

1. Added kinfo_pcb

  • Constants:
    • PCB_SLOP
    • PCB_ALL

2. kinfo_file structure

  • Contants
    • KERN_FILE_BYFILE
    • KERN_FILE_BYPID
    • KERN_FILESLOP

3. File descriptor types

  • DTYPE_VNODE
  • DTYPE_SOCKET
  • DTYPE_PIPE
  • DTYPE_MISC
  • DTYPE_CRYPTO
  • DTYPE_MQUEUE
  • DTYPE_SEM
  • DTYPE_EVENTFD
  • DTYPE_TIMERFD

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    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.

@rustbot
Copy link
Collaborator

rustbot commented Feb 19, 2026

Some changes occurred in a NetBSD-like module

cc @semarie

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Feb 19, 2026
- added `kinfo_pcb` struct and related constants
- added `kinfo_file` struct and related constants
@semarie
Copy link
Contributor

semarie commented Feb 19, 2026

Some changes occurred in a NetBSD-like module

cc @semarie

just to note that the PR is properly rebased to NetBSD only 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants