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.
This commit is contained in:
Linus Groh
2026-01-09 00:24:42 +00:00
committed by Andrew Kelley
parent b929078dac
commit 27039a014c
+2 -2
View File
@@ -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 => {},
};