| author | |
| committer | |
| log | 0e45b9d5db6cd92578d1a1da13ff2c036603ff91 |
| tree | 00c33480840964891018ec48a3330f7bc253c229 |
| parent | 3e372f19944ca2b3251c9e3295722d24c945302f |
3 files changed, 38 insertions(+), 0 deletions(-)
lib/std/c.zig+31| ... | @@ -4124,6 +4124,37 @@ pub const itimerspec = switch (native_os) { | ... | @@ -4124,6 +4124,37 @@ pub const itimerspec = switch (native_os) { |
| 4124 | }, | 4124 | }, |
| 4125 | else => void, | 4125 | else => void, |
| 4126 | }; | 4126 | }; |
| 4127 | pub const linger = switch (native_os) { | ||
| 4128 | .linux => linux.linger, | ||
| 4129 | // https://github.com/freebsd/freebsd-src/blob/46347b3619757e3d683a87ca03efaf2ae242335f/sys/sys/socket.h#L200 | ||
| 4130 | .freebsd, | ||
| 4131 | // https://github.com/DragonFlyBSD/DragonFlyBSD/blob/6098912863ed4c7b3f70d7483910ce2956cf4ed3/sys/sys/socket.h#L158 | ||
| 4132 | .dragonfly, | ||
| 4133 | // https://github.com/NetBSD/src/blob/80bf25a5691072d4755e84567ccbdf0729370dea/sys/sys/socket.h#L183 | ||
| 4134 | .netbsd, | ||
| 4135 | // https://github.com/openbsd/src/blob/718a31b40d39fc6064de6355eb144e74633133fc/sys/sys/socket.h#L126 | ||
| 4136 | .openbsd, | ||
| 4137 | // https://github.com/kofemann/opensolaris/blob/80192cd83bf665e708269dae856f9145f7190f74/usr/src/uts/common/sys/socket.h#L214 | ||
| 4138 | .solaris, | ||
| 4139 | // https://github.com/illumos/illumos-gate/blob/608eb926e14f4ba4736b2d59e891335f1cba9e1e/usr/src/uts/common/sys/socket.h#L250 | ||
| 4140 | .illumos, | ||
| 4141 | // https://github.com/haiku/haiku/blob/2aab5f5f14aeb3f34c3a3d9a9064cc3c0d914bea/headers/posix/sys/socket.h#L87 | ||
| 4142 | .haiku, | ||
| 4143 | // https://github.com/SerenityOS/serenity/blob/5bd8af99be0bc4b2e14f361fd7d7590e6bcfa4d6/Kernel/API/POSIX/sys/socket.h#L122 | ||
| 4144 | .serenity, | ||
| 4145 | // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L498 | ||
| 4146 | .driverkit, | ||
| 4147 | .ios, | ||
| 4148 | .macos, | ||
| 4149 | .tvos, | ||
| 4150 | .watchos, | ||
| 4151 | .visionos, | ||
| 4152 | => extern struct { | ||
| 4153 | onoff: i32, // non-zero to linger on close | ||
| 4154 | linger: i32, // time to linger in seconds | ||
| 4155 | }, | ||
| 4156 | else => void, | ||
| 4157 | }; | ||
| 4127 | pub const msghdr = switch (native_os) { | 4158 | pub const msghdr = switch (native_os) { |
| 4128 | .linux => linux.msghdr, | 4159 | .linux => linux.msghdr, |
| 4129 | .openbsd, | 4160 | .openbsd, |
lib/std/os/linux.zig+6| ... | @@ -4524,6 +4524,12 @@ pub const IPV6 = struct { | ... | @@ -4524,6 +4524,12 @@ pub const IPV6 = struct { |
| 4524 | pub const FREEBIND = 78; | 4524 | pub const FREEBIND = 78; |
| 4525 | }; | 4525 | }; |
| 4526 | 4526 | ||
| 4527 | // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/socket.h?id=b1e904999542ad6764eafa54545f1c55776006d1#n43 | ||
| 4528 | pub const linger = extern struct { | ||
| 4529 | onoff: i32, // non-zero to linger on close | ||
| 4530 | linger: i32, // time to linger in seconds | ||
| 4531 | }; | ||
| 4532 | |||
| 4527 | // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/in.h?id=64e844505bc08cde3f346f193cbbbab0096fef54#n250 | 4533 | // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/in.h?id=64e844505bc08cde3f346f193cbbbab0096fef54#n250 |
| 4528 | pub const in_pktinfo = extern struct { | 4534 | pub const in_pktinfo = extern struct { |
| 4529 | ifindex: i32, | 4535 | ifindex: i32, |
lib/std/posix.zig+1| ... | @@ -137,6 +137,7 @@ pub const ifreq = system.ifreq; | ... | @@ -137,6 +137,7 @@ pub const ifreq = system.ifreq; |
| 137 | pub const in_pktinfo = system.in_pktinfo; | 137 | pub const in_pktinfo = system.in_pktinfo; |
| 138 | pub const in6_pktinfo = system.in6_pktinfo; | 138 | pub const in6_pktinfo = system.in6_pktinfo; |
| 139 | pub const ino_t = system.ino_t; | 139 | pub const ino_t = system.ino_t; |
| 140 | pub const linger = system.linger; | ||
| 140 | pub const mcontext_t = system.mcontext_t; | 141 | pub const mcontext_t = system.mcontext_t; |
| 141 | pub const mode_t = system.mode_t; | 142 | pub const mode_t = system.mode_t; |
| 142 | pub const msghdr = system.msghdr; | 143 | pub const msghdr = system.msghdr; |