Commit 898658e3a0

David Rubin <daviru007@icloud.com>
2025-01-28 09:08:28
std.c: add `msghdr` and `msghdr_const` definitions for macos
1 parent 308ba80
Changed files (1)
lib
std
lib/std/c.zig
@@ -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