mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01: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
2 changed files with 6 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue