mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
Merge pull request #22725 from mrjbq7/timerfd_clockid_t
Fix timerfd_clockid_t on linux and freebsd
This commit is contained in:
commit
08d661fcfd
@ -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,
|
||||
};
|
||||
|
||||
|
||||
@ -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,
|
||||
_,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user