From a3ddca36571993af4a575296292e17471890fc87 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 22 Oct 2025 04:20:52 -0700 Subject: [PATCH] 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. --- lib/std/Io/Threaded.zig | 4 +--- lib/std/os/windows/ws2_32.zig | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index a567878b825e3ccf6a6e720c0e8eacaa4236670a..59af60032a8feb5a8ea4db4fc020c2383e8c8edf 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -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) { diff --git a/lib/std/os/windows/ws2_32.zig b/lib/std/os/windows/ws2_32.zig index c10759b153846e10bafed292ff8c55a26233b3db..5d5e29c00e9d74fe246edd31a4118cbe332d4f6d 100644 --- a/lib/std/os/windows/ws2_32.zig +++ b/lib/std/os/windows/ws2_32.zig @@ -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; -- 2.54.0