| ... | @@ -13923,9 +13923,14 @@ fn netLookupFallible( | ... | @@ -13923,9 +13923,14 @@ fn netLookupFallible( |
| 13923 | var port_buffer: [8]u8 = undefined; | 13923 | var port_buffer: [8]u8 = undefined; |
| 13924 | const port_c = std.fmt.bufPrintSentinel(&port_buffer, "{d}", .{options.port}, 0) catch unreachable; | 13924 | const port_c = std.fmt.bufPrintSentinel(&port_buffer, "{d}", .{options.port}, 0) catch unreachable; |
| 13925 | | 13925 | |
| | 13926 | const family: i32 = if (options.family) |f| switch (f) { |
| | 13927 | .ip4 => posix.AF.INET, |
| | 13928 | .ip6 => posix.AF.INET6, |
| | 13929 | } else posix.AF.UNSPEC; |
| | 13930 | |
| 13926 | const hints: posix.addrinfo = .{ | 13931 | const hints: posix.addrinfo = .{ |
| 13927 | .flags = .{ .CANONNAME = options.canonical_name_buffer != null, .NUMERICSERV = true }, | 13932 | .flags = .{ .CANONNAME = options.canonical_name_buffer != null, .NUMERICSERV = true }, |
| 13928 | .family = posix.AF.UNSPEC, | 13933 | .family = family, |
| 13929 | .socktype = posix.SOCK.STREAM, | 13934 | .socktype = posix.SOCK.STREAM, |
| 13930 | .protocol = posix.IPPROTO.TCP, | 13935 | .protocol = posix.IPPROTO.TCP, |
| 13931 | .canonname = null, | 13936 | .canonname = null, |