authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-07-30 23:28:58+01:00
committergravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-07-30 23:28:58+01:00
logce776d32455f5ac43f91cc8904765836c00605cf
tree3ca866d59b720fdb175ceab5f5ef7d19da01ca2a
parent813a0f125e2619f0a056d675339cab6ce34a2cbf

std: Add serenity to more OS checks


4 files changed, 5 insertions(+), 2 deletions(-)

lib/std/Progress.zig+1
......@@ -1548,6 +1548,7 @@ const have_sigwinch = switch (builtin.os.tag) {
15481548 .visionos,
15491549 .dragonfly,
15501550 .freebsd,
1551 .serenity,
15511552 => true,
15521553
15531554 else => false,
lib/std/heap.zig+1-1
......@@ -146,7 +146,7 @@ const CAllocator = struct {
146146 else {};
147147
148148 pub const supports_posix_memalign = switch (builtin.os.tag) {
149 .dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos => true,
149 .dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => true,
150150 else => false,
151151 };
152152
lib/std/posix.zig+2-1
......@@ -1129,8 +1129,9 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
11291129/// * Windows
11301130/// On these systems, the read races with concurrent writes to the same file descriptor.
11311131pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
1132 // NOTE: serenity does not have preadv but it *does* have pwritev.
11321133 const have_pread_but_not_preadv = switch (native_os) {
1133 .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,
1134 .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku, .serenity => true,
11341135 else => false,
11351136 };
11361137 if (have_pread_but_not_preadv) {
lib/std/start.zig+1
......@@ -699,6 +699,7 @@ fn maybeIgnoreSigpipe() void {
699699 .visionos,
700700 .dragonfly,
701701 .freebsd,
702 .serenity,
702703 => true,
703704
704705 else => false,