From 27039a014c591aff8ab50fd3e757a803bc116e8e Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 9 Jan 2026 00:24:42 +0000 Subject: [PATCH] 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. --- lib/std/c.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/c.zig b/lib/std/c.zig index 3ddf90d986..8417398384 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -11088,7 +11088,7 @@ pub extern "c" fn pthread_get_name_np(thread: pthread_t, name: [*:0]u8, len: usi pub const TIMER = switch (native_os) { .linux, .emscripten => std.os.linux.TIMER, - .openbsd, .netbsd, .wasi, .windows, .freebsd => packed struct(u32) { + .openbsd, .netbsd, .wasi, .windows, .freebsd, .serenity => packed struct(u32) { ABSTIME: bool, _: u31 = 0, }, @@ -11096,7 +11096,7 @@ pub const TIMER = switch (native_os) { }; pub const clock_nanosleep = switch (native_os) { - .linux, .emscripten, .netbsd, .wasi, .windows, .freebsd => private.clock_nanosleep, + .linux, .emscripten, .netbsd, .wasi, .windows, .freebsd, .serenity => private.clock_nanosleep, else => {}, };