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:
Andrew Kelley 2025-10-22 04:20:52 -07:00
parent 2f26025690
commit a3ddca3657
2 changed files with 1 additions and 7 deletions

View File

@ -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) {

View File

@ -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;