std.c: add msghdr and msghdr_const definitions for macos

This commit is contained in:
David Rubin 2025-01-28 00:08:28 -08:00 committed by Alex Rønne Petersen
parent 308ba80597
commit 898658e3a0

View File

@ -3528,7 +3528,21 @@ pub const itimerspec = switch (native_os) {
};
pub const msghdr = switch (native_os) {
.linux => linux.msghdr,
.openbsd, .emscripten, .dragonfly, .freebsd, .netbsd, .haiku, .solaris, .illumos => extern struct {
.openbsd,
.emscripten,
.dragonfly,
.freebsd,
.netbsd,
.haiku,
.solaris,
.illumos,
.macos,
.driverkit,
.ios,
.tvos,
.visionos,
.watchos,
=> extern struct {
/// optional address
name: ?*sockaddr,
/// size of address
@ -3548,7 +3562,21 @@ pub const msghdr = switch (native_os) {
};
pub const msghdr_const = switch (native_os) {
.linux => linux.msghdr_const,
.openbsd, .emscripten, .dragonfly, .freebsd, .netbsd, .haiku, .solaris, .illumos => extern struct {
.openbsd,
.emscripten,
.dragonfly,
.freebsd,
.netbsd,
.haiku,
.solaris,
.illumos,
.macos,
.driverkit,
.ios,
.tvos,
.visionos,
.watchos,
=> extern struct {
/// optional address
name: ?*const sockaddr,
/// size of address