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) {...@@ -1548,6 +1548,7 @@ const have_sigwinch = switch (builtin.os.tag) {
1548 .visionos,1548 .visionos,
1549 .dragonfly,1549 .dragonfly,
1550 .freebsd,1550 .freebsd,
1551 .serenity,
1551 => true,1552 => true,
15521553
1553 else => false,1554 else => false,
lib/std/heap.zig+1-1
...@@ -146,7 +146,7 @@ const CAllocator = struct {...@@ -146,7 +146,7 @@ const CAllocator = struct {
146 else {};146 else {};
147147
148 pub const supports_posix_memalign = switch (builtin.os.tag) {148 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,
150 else => false,150 else => false,
151 };151 };
152152
lib/std/posix.zig+2-1
...@@ -1129,8 +1129,9 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {...@@ -1129,8 +1129,9 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
1129/// * Windows1129/// * Windows
1130/// On these systems, the read races with concurrent writes to the same file descriptor.1130/// On these systems, the read races with concurrent writes to the same file descriptor.
1131pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {1131pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
1132 // NOTE: serenity does not have preadv but it *does* have pwritev.
1132 const have_pread_but_not_preadv = switch (native_os) {1133 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,
1134 else => false,1135 else => false,
1135 };1136 };
1136 if (have_pread_but_not_preadv) {1137 if (have_pread_but_not_preadv) {
lib/std/start.zig+1
...@@ -699,6 +699,7 @@ fn maybeIgnoreSigpipe() void {...@@ -699,6 +699,7 @@ fn maybeIgnoreSigpipe() void {
699 .visionos,699 .visionos,
700 .dragonfly,700 .dragonfly,
701 .freebsd,701 .freebsd,
702 .serenity,
702 => true,703 => true,
703704
704 else => false,705 else => false,