commit 08d661fcfdfb0a7b99f8bfbf4912acd21cf72d6f (tree)
parent 317722b37b201e393aed60045f4bf9649103e63e
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Mon, 3 Feb 2025 22:51:13 +0100
Merge pull request #22725 from mrjbq7/timerfd_clockid_t
Fix timerfd_clockid_t on linux and freebsd
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/std/c.zig b/lib/std/c.zig
@@ -222,11 +222,12 @@ pub const ARCH = switch (native_os) {
// that actually work.
pub const TIMERFD_CLOCK = timerfd_clockid_t;
pub const timerfd_clockid_t = switch (native_os) {
- .linux, .freebsd => enum(u32) {
+ .freebsd => enum(u32) {
REALTIME = 0,
- MONOTONIC = 1,
+ MONOTONIC = 4,
_,
},
+ .linux => linux.timerfd_clockid_t,
else => clockid_t,
};
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig
@@ -4722,6 +4722,9 @@ pub const TIMERFD_CLOCK = timerfd_clockid_t;
pub const timerfd_clockid_t = enum(u32) {
REALTIME = 0,
MONOTONIC = 1,
+ BOOTTIME = 7,
+ REALTIME_ALARM = 8,
+ BOOTTIME_ALARM = 9,
_,
};