aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-07-15 01:42:40 +0200
committerGitHub <noreply@github.com>2025-07-15 01:42:40 +0200
commit148befdaa32cb42837f83733b4f299be86743d71 (patch)
tree363119c1b8430966a2260a16640b932bb1160e17 /lib/std/c.zig
parentf3f2a56859f96cee6f9bc8e8fe14b99ec653abaf (diff)
parente4ebbdb354f5d562f7fca025f57e4775d9c23882 (diff)
downloadzig-148befdaa32cb42837f83733b4f299be86743d71.tar.gz
zig-148befdaa32cb42837f83733b4f299be86743d71.zip
Merge pull request #24409 from ziglang/net
std.net: update to new I/O API
Diffstat (limited to 'lib/std/c.zig')
-rw-r--r--lib/std/c.zig41
1 files changed, 39 insertions, 2 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig
index 51f1ddfaeb..2880e3850a 100644
--- a/lib/std/c.zig
+++ b/lib/std/c.zig
@@ -4110,7 +4110,7 @@ pub const msghdr_const = switch (native_os) {
/// scatter/gather array
iov: [*]const iovec_const,
/// # elements in iov
- iovlen: i32,
+ iovlen: u32,
/// ancillary data
control: ?*const anyopaque,
/// ancillary data buffer len
@@ -4122,7 +4122,7 @@ pub const msghdr_const = switch (native_os) {
name: ?*const anyopaque,
namelen: socklen_t,
iov: [*]const iovec,
- iovlen: c_int,
+ iovlen: c_uint,
control: ?*const anyopaque,
controllen: socklen_t,
flags: c_int,
@@ -5625,6 +5625,43 @@ pub const MSG = switch (native_os) {
pub const NOSIGNAL = 0x80;
pub const EOR = 0x100;
},
+ .freebsd => struct {
+ pub const OOB = 0x00000001;
+ pub const PEEK = 0x00000002;
+ pub const DONTROUTE = 0x00000004;
+ pub const EOR = 0x00000008;
+ pub const TRUNC = 0x00000010;
+ pub const CTRUNC = 0x00000020;
+ pub const WAITALL = 0x00000040;
+ pub const DONTWAIT = 0x00000080;
+ pub const EOF = 0x00000100;
+ pub const NOTIFICATION = 0x00002000;
+ pub const NBIO = 0x00004000;
+ pub const COMPAT = 0x00008000;
+ pub const SOCALLBCK = 0x00010000;
+ pub const NOSIGNAL = 0x00020000;
+ pub const CMSG_CLOEXEC = 0x00040000;
+ pub const WAITFORONE = 0x00080000;
+ pub const MORETOCOME = 0x00100000;
+ pub const TLSAPPDATA = 0x00200000;
+ },
+ .netbsd => struct {
+ pub const OOB = 0x0001;
+ pub const PEEK = 0x0002;
+ pub const DONTROUTE = 0x0004;
+ pub const EOR = 0x0008;
+ pub const TRUNC = 0x0010;
+ pub const CTRUNC = 0x0020;
+ pub const WAITALL = 0x0040;
+ pub const DONTWAIT = 0x0080;
+ pub const BCAST = 0x0100;
+ pub const MCAST = 0x0200;
+ pub const NOSIGNAL = 0x0400;
+ pub const CMSG_CLOEXEC = 0x0800;
+ pub const NBIO = 0x1000;
+ pub const WAITFORONE = 0x2000;
+ pub const NOTIFICATION = 0x4000;
+ },
else => void,
};
pub const SOCK = switch (native_os) {