| ... | ... | @@ -1,12 +1,14 @@ |
| 1 | | const std = @import("std"); |
| 2 | 1 | const builtin = @import("builtin"); |
| 2 | const native_abi = builtin.abi; |
| 3 | const native_arch = builtin.cpu.arch; |
| 4 | const native_os = builtin.os.tag; |
| 5 | const native_endian = builtin.cpu.arch.endian(); |
| 6 | |
| 7 | const std = @import("std"); |
| 3 | 8 | const c = @This(); |
| 4 | 9 | const maxInt = std.math.maxInt; |
| 5 | 10 | const assert = std.debug.assert; |
| 6 | 11 | const page_size = std.heap.page_size_min; |
| 7 | | const native_abi = builtin.abi; |
| 8 | | const native_arch = builtin.cpu.arch; |
| 9 | | const native_os = builtin.os.tag; |
| 10 | 12 | const linux = std.os.linux; |
| 11 | 13 | const emscripten = std.os.emscripten; |
| 12 | 14 | const wasi = std.os.wasi; |
| ... | ... | @@ -4118,9 +4120,13 @@ const posix_msghdr = extern struct { |
| 4118 | 4120 | name: ?*sockaddr, |
| 4119 | 4121 | namelen: socklen_t, |
| 4120 | 4122 | iov: [*]iovec, |
| 4123 | pad0: if (@sizeOf(usize) == 8 and native_endian == .big) u32 else u0 = 0, |
| 4121 | 4124 | iovlen: u32, |
| 4125 | pad1: if (@sizeOf(usize) == 8 and native_endian == .little) u32 else u0 = 0, |
| 4122 | 4126 | control: ?*anyopaque, |
| 4127 | pad2: if (@sizeOf(usize) == 8 and native_endian == .big) u32 else u0 = 0, |
| 4123 | 4128 | controllen: socklen_t, |
| 4129 | pad3: if (@sizeOf(usize) == 8 and native_endian == .little) u32 else u0 = 0, |
| 4124 | 4130 | flags: u32, |
| 4125 | 4131 | }; |
| 4126 | 4132 | |
| ... | ... | @@ -4148,9 +4154,13 @@ const posix_msghdr_const = extern struct { |
| 4148 | 4154 | name: ?*const sockaddr, |
| 4149 | 4155 | namelen: socklen_t, |
| 4150 | 4156 | iov: [*]const iovec_const, |
| 4157 | pad0: if (@sizeOf(usize) == 8 and native_endian == .big) u32 else u0 = 0, |
| 4151 | 4158 | iovlen: u32, |
| 4159 | pad1: if (@sizeOf(usize) == 8 and native_endian == .little) u32 else u0 = 0, |
| 4152 | 4160 | control: ?*const anyopaque, |
| 4161 | pad2: if (@sizeOf(usize) == 8 and native_endian == .big) u32 else u0 = 0, |
| 4153 | 4162 | controllen: socklen_t, |
| 4163 | pad3: if (@sizeOf(usize) == 8 and native_endian == .little) u32 else u0 = 0, |
| 4154 | 4164 | flags: u32, |
| 4155 | 4165 | }; |
| 4156 | 4166 | |
| ... | ... | @@ -4193,7 +4203,9 @@ pub const cmsghdr = switch (native_os) { |
| 4193 | 4203 | }; |
| 4194 | 4204 | |
| 4195 | 4205 | const posix_cmsghdr = extern struct { |
| 4206 | pad0: if (@sizeOf(usize) == 8 and native_endian == .big) u32 else u0 = 0, |
| 4196 | 4207 | len: socklen_t, |
| 4208 | pad1: if (@sizeOf(usize) == 8 and native_endian == .little) u32 else u0 = 0, |
| 4197 | 4209 | level: c_int, |
| 4198 | 4210 | type: c_int, |
| 4199 | 4211 | }; |