Skip to content

Commit ce776d3

Browse files
committed
std: Add serenity to more OS checks
1 parent 813a0f1 commit ce776d3

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

lib/std/Progress.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.
11311131
pub 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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ fn maybeIgnoreSigpipe() void {
699699
.visionos,
700700
.dragonfly,
701701
.freebsd,
702+
.serenity,
702703
=> true,
703704

704705
else => false,

0 commit comments

Comments
 (0)