From 51728f10535d9a10fcee85a6e03ee82e3211a149 Mon Sep 17 00:00:00 2001 From: Michael Dusan Date: Mon, 29 Dec 2025 21:02:11 -0500 Subject: [PATCH] openbsd: add timespec OMIT and NOW definitions --- lib/std/c.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/std/c.zig b/lib/std/c.zig index 5f0d2dedf879bcabaa3117414d737c78a4b3aabc..53d30d80283eff673eb0f2de137e8c5e16ef604f 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -167,6 +167,18 @@ pub const timespec = switch (native_os) { .openbsd, .haiku => extern struct { sec: time_t, nsec: isize, + + /// For use with `utimensat` and `futimens`. + pub const NOW: timespec = .{ + .sec = 0, // ignored + .nsec = -2, + }; + + /// For use with `utimensat` and `futimens`. + pub const OMIT: timespec = .{ + .sec = 0, // ignored + .nsec = -1, + }; }, else => void, }; -- 2.54.0