From 8910ac2ba877ebf745fb35b8ec9b21fdc70d092a Mon Sep 17 00:00:00 2001 From: Elaine Gibson Date: Sat, 31 May 2025 01:55:55 +0100 Subject: std.c.SOCK: define NONBLOCK and CLOEXEC for haiku --- lib/std/c.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/std/c.zig') diff --git a/lib/std/c.zig b/lib/std/c.zig index 25d45ae8a6..6d49e8de8a 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -5703,6 +5703,9 @@ pub const SOCK = switch (native_os) { pub const RAW = 3; pub const SEQPACKET = 5; pub const MISC = 255; + + pub const NONBLOCK = 0x40000; + pub const CLOEXEC = 0x80000; }, .openbsd => struct { pub const STREAM = 1; -- cgit v1.2.3 From 2139eb75f9e1e6fa766797b60566b254efce2f8f Mon Sep 17 00:00:00 2001 From: Elaine Gibson Date: Sat, 31 May 2025 03:04:58 +0100 Subject: std.c: getcontext is not supported on haiku --- lib/std/c.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/std/c.zig') diff --git a/lib/std/c.zig b/lib/std/c.zig index 6d49e8de8a..390d5f89c3 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -10827,8 +10827,8 @@ pub const LC = enum(c_int) { pub extern "c" fn setlocale(category: LC, locale: ?[*:0]const u8) ?[*:0]const u8; -pub const getcontext = if (builtin.target.abi.isAndroid() or builtin.target.os.tag == .openbsd) -{} // android bionic and openbsd libc does not implement getcontext +pub const getcontext = if (builtin.target.abi.isAndroid() or builtin.target.os.tag == .openbsd or builtin.target.os.tag == .haiku) +{} // libc does not implement getcontext else if (native_os == .linux and builtin.target.abi.isMusl()) linux.getcontext else -- cgit v1.2.3