Skip to content

Commit afdd043

Browse files
linusgandrewrk
authored andcommitted
std: serenity has preadv now
SerenityOS/serenity@2a9154e
1 parent bf90825 commit afdd043

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/std/Io/Threaded.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ pub fn ioBasic(t: *Threaded) Io {
356356
};
357357
}
358358

359-
pub const socket_flags_unsupported = native_os.isDarwin() or native_os == .haiku; // 💩💩
359+
pub const socket_flags_unsupported = native_os.isDarwin() or native_os == .haiku;
360360
const have_accept4 = !socket_flags_unsupported;
361361
const have_flock_open_flags = @hasField(posix.O, "EXLOCK");
362362
const have_networking = native_os != .wasi;
@@ -367,7 +367,7 @@ const have_futex = switch (builtin.cpu.arch) {
367367
else => true,
368368
};
369369
const have_preadv = switch (native_os) {
370-
.windows, .haiku, .serenity => false, // 💩💩💩
370+
.windows, .haiku => false,
371371
else => true,
372372
};
373373
const have_sig_io = posix.SIG != void and @hasField(posix.SIG, "IO");

lib/std/posix.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,9 +1114,8 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
11141114
/// * Windows
11151115
/// On these systems, the read races with concurrent writes to the same file descriptor.
11161116
pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
1117-
// NOTE: serenity does not have preadv but it *does* have pwritev.
11181117
const have_pread_but_not_preadv = switch (native_os) {
1119-
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku, .serenity => true,
1118+
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,
11201119
else => false,
11211120
};
11221121
if (have_pread_but_not_preadv) {

0 commit comments

Comments
 (0)