mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std: Add serenity to more OS checks
This commit is contained in:
parent
813a0f125e
commit
ce776d3245
@ -1548,6 +1548,7 @@ const have_sigwinch = switch (builtin.os.tag) {
|
||||
.visionos,
|
||||
.dragonfly,
|
||||
.freebsd,
|
||||
.serenity,
|
||||
=> true,
|
||||
|
||||
else => false,
|
||||
|
||||
@ -146,7 +146,7 @@ const CAllocator = struct {
|
||||
else {};
|
||||
|
||||
pub const supports_posix_memalign = switch (builtin.os.tag) {
|
||||
.dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos => true,
|
||||
.dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => true,
|
||||
else => false,
|
||||
};
|
||||
|
||||
|
||||
@ -1129,8 +1129,9 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
|
||||
/// * Windows
|
||||
/// On these systems, the read races with concurrent writes to the same file descriptor.
|
||||
pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
|
||||
// NOTE: serenity does not have preadv but it *does* have pwritev.
|
||||
const have_pread_but_not_preadv = switch (native_os) {
|
||||
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,
|
||||
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku, .serenity => true,
|
||||
else => false,
|
||||
};
|
||||
if (have_pread_but_not_preadv) {
|
||||
|
||||
@ -699,6 +699,7 @@ fn maybeIgnoreSigpipe() void {
|
||||
.visionos,
|
||||
.dragonfly,
|
||||
.freebsd,
|
||||
.serenity,
|
||||
=> true,
|
||||
|
||||
else => false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user