mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std.Io.Threaded: delete Windows implementation of if_nametoindex
Microsoft documentation says "The if_nametoindex function is implemented for portability of applications with Unix environments, but the ConvertInterface functions are preferred." This was also the only dependency on iphlpapi.
This commit is contained in:
parent
2f26025690
commit
a3ddca3657
@ -4000,9 +4000,7 @@ fn netInterfaceNameResolve(
|
||||
|
||||
if (native_os == .windows) {
|
||||
try t.checkCancel();
|
||||
const index = ws2_32.if_nametoindex(&name.bytes);
|
||||
if (index == 0) return error.InterfaceNotFound;
|
||||
return .{ .index = index };
|
||||
@panic("TODO");
|
||||
}
|
||||
|
||||
if (builtin.link_libc) {
|
||||
|
||||
@ -2161,7 +2161,3 @@ pub extern "ws2_32" fn getnameinfo(
|
||||
ServiceBufferName: u32,
|
||||
Flags: i32,
|
||||
) callconv(.winapi) i32;
|
||||
|
||||
pub extern "iphlpapi" fn if_nametoindex(
|
||||
InterfaceName: [*:0]const u8,
|
||||
) callconv(.winapi) u32;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user