authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-02-03 22:51:13+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-02-03 22:51:13+01:00
log08d661fcfdfb0a7b99f8bfbf4912acd21cf72d6f
tree914f049b3380f18720b4402052027a129216f1bf
parent317722b37b201e393aed60045f4bf9649103e63e
parent7309a13bd880982209832c4845912bddc245dcc3
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #22725 from mrjbq7/timerfd_clockid_t

Fix timerfd_clockid_t on linux and freebsd

2 files changed, 6 insertions(+), 2 deletions(-)

lib/std/c.zig+3-2
......@@ -222,11 +222,12 @@ pub const ARCH = switch (native_os) {
222222// that actually work.
223223pub const TIMERFD_CLOCK = timerfd_clockid_t;
224224pub const timerfd_clockid_t = switch (native_os) {
225 .linux, .freebsd => enum(u32) {
225 .freebsd => enum(u32) {
226226 REALTIME = 0,
227 MONOTONIC = 1,
227 MONOTONIC = 4,
228228 _,
229229 },
230 .linux => linux.timerfd_clockid_t,
230231 else => clockid_t,
231232};
232233
lib/std/os/linux.zig+3
......@@ -4722,6 +4722,9 @@ pub const TIMERFD_CLOCK = timerfd_clockid_t;
47224722pub const timerfd_clockid_t = enum(u32) {
47234723 REALTIME = 0,
47244724 MONOTONIC = 1,
4725 BOOTTIME = 7,
4726 REALTIME_ALARM = 8,
4727 BOOTTIME_ALARM = 9,
47254728 _,
47264729};
47274730