Skip to content

time: Add netbsdlike support for several ClockID constants#2716

Merged
SteveLauC merged 1 commit intonix-rust:masterfrom
xtqqczze:clockid-netbsdlike
Mar 16, 2026
Merged

time: Add netbsdlike support for several ClockID constants#2716
SteveLauC merged 1 commit intonix-rust:masterfrom
xtqqczze:clockid-netbsdlike

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Dec 19, 2025

Changes

Add netbsdlike (netbsd, openbsd) to existing cfg conditions for the following ClockId constants:

  • CLOCK_BOOTTIME (openbsd only)
  • CLOCK_PROCESS_CPUTIME_ID
  • CLOCK_THREAD_CPUTIME_ID
  • CLOCK_UPTIME (openbsd only)

Rationale

Both platforms expose these constants in their system interfaces:

Notes

Some constants documented in the manuals are not included because they are currently missing from the libc crate. They can be added once they become available upstream, see rust-lang/libc#5017.

@oech3

This comment was marked as resolved.

@xtqqczze xtqqczze marked this pull request as draft March 14, 2026 12:40
@xtqqczze xtqqczze force-pushed the clockid-netbsdlike branch from d25b9bd to bce615d Compare March 14, 2026 12:43
@xtqqczze xtqqczze changed the title time: Provide ClockID associated constants for openbsd and netbsd time: Provide ClockID associated constants for netbsdlike Mar 14, 2026
@xtqqczze xtqqczze changed the title time: Provide ClockID associated constants for netbsdlike time: Add netbsdlike support for several ClockID constants Mar 14, 2026
@xtqqczze xtqqczze force-pushed the clockid-netbsdlike branch 3 times, most recently from abba683 to 333b27f Compare March 14, 2026 13:12
@xtqqczze xtqqczze marked this pull request as ready for review March 14, 2026 17:36
Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SteveLauC SteveLauC enabled auto-merge March 16, 2026 07:12
@SteveLauC SteveLauC force-pushed the clockid-netbsdlike branch from 333b27f to 257411b Compare March 16, 2026 07:17
@SteveLauC SteveLauC added this pull request to the merge queue Mar 16, 2026
Merged via the queue into nix-rust:master with commit 46c2e6d Mar 16, 2026
43 of 44 checks passed
@xtqqczze xtqqczze deleted the clockid-netbsdlike branch March 16, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants