authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2026-01-09 00:24:42+00:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-09 09:37:49+01:00
log27039a014c591aff8ab50fd3e757a803bc116e8e
tree1e1785f9fc5378b470cb8446eed36a3f5a288ea4
parentb929078dac59c480f03797af9308b696fb03807e

std.c: Make clock_nanosleep available on serenity

Follow-up to https://codeberg.org/ziglang/zig/pulls/30746. The TIMER_ABSTIME value was adjusted to match other systems in https://github.com/SerenityOS/serenity/pull/26543.

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

lib/std/c.zig+2-2
...@@ -11088,7 +11088,7 @@ pub extern "c" fn pthread_get_name_np(thread: pthread_t, name: [*:0]u8, len: usi...@@ -11088,7 +11088,7 @@ pub extern "c" fn pthread_get_name_np(thread: pthread_t, name: [*:0]u8, len: usi
1108811088
11089pub const TIMER = switch (native_os) {11089pub const TIMER = switch (native_os) {
11090 .linux, .emscripten => std.os.linux.TIMER,11090 .linux, .emscripten => std.os.linux.TIMER,
11091 .openbsd, .netbsd, .wasi, .windows, .freebsd => packed struct(u32) {11091 .openbsd, .netbsd, .wasi, .windows, .freebsd, .serenity => packed struct(u32) {
11092 ABSTIME: bool,11092 ABSTIME: bool,
11093 _: u31 = 0,11093 _: u31 = 0,
11094 },11094 },
...@@ -11096,7 +11096,7 @@ pub const TIMER = switch (native_os) {...@@ -11096,7 +11096,7 @@ pub const TIMER = switch (native_os) {
11096};11096};
1109711097
11098pub const clock_nanosleep = switch (native_os) {11098pub const clock_nanosleep = switch (native_os) {
11099 .linux, .emscripten, .netbsd, .wasi, .windows, .freebsd => private.clock_nanosleep,11099 .linux, .emscripten, .netbsd, .wasi, .windows, .freebsd, .serenity => private.clock_nanosleep,
11100 else => {},11100 else => {},
11101};11101};
1110211102