aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c.zig
diff options
context:
space:
mode:
authorBrandon Mercer <yourcomputerpal@gmail.com>2025-08-30 18:04:32 -0400
committerGitHub <noreply@github.com>2025-08-30 22:04:32 +0000
commit7fdd60df1c40bc36a8e0b35be3e35f81dd97fbce (patch)
tree9936074733d6a99bcb371c826ecfbded267da05b /lib/std/c.zig
parentb7104231af68c26b850325748a64f15119a2dd69 (diff)
downloadzig-7fdd60df1c40bc36a8e0b35be3e35f81dd97fbce.tar.gz
zig-7fdd60df1c40bc36a8e0b35be3e35f81dd97fbce.zip
Populate MSG struct for OpenBSD (#25076)
* update the MSG struct with the correct values for openbsd * add comment with link to sys/sys/socket.h --------- Co-authored-by: Brandon Mercer <bmercer@eutonian.com>
Diffstat (limited to 'lib/std/c.zig')
-rw-r--r--lib/std/c.zig17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig
index 1d61dc3c73..7cec1df782 100644
--- a/lib/std/c.zig
+++ b/lib/std/c.zig
@@ -5704,6 +5704,23 @@ pub const MSG = switch (native_os) {
pub const WAITFORONE = 0x2000;
pub const NOTIFICATION = 0x4000;
},
+ // https://github.com/openbsd/src/blob/42a7be81bef70c04732f45ec573622effe56b563/sys/sys/socket.h#L506
+ .openbsd => struct {
+ pub const OOB = 0x1;
+ pub const PEEK = 0x2;
+ pub const DONTROUTE = 0x4;
+ pub const EOR = 0x8;
+ pub const TRUNC = 0x10;
+ pub const CTRUNC = 0x20;
+ pub const WAITALL = 0x40;
+ pub const DONTWAIT = 0x80;
+ pub const BCAST = 0x100;
+ pub const MCAST = 0x200;
+ pub const NOSIGNAL = 0x400;
+ pub const CMSG_CLOEXEC = 0x800;
+ pub const WAITFORONE = 0x1000;
+ pub const CMSG_CLOFORK = 0x2000;
+ },
else => void,
};
pub const SOCK = switch (native_os) {