zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit a3ddca36571993af4a575296292e17471890fc87 (tree)
parent 2f260256903a5130e879ab7dc020fa160befc4d9
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Wed, 22 Oct 2025 04:20:52 -0700

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.

Diffstat:
Mlib/std/Io/Threaded.zig | 4+---
Mlib/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 @@ -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 @@ -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;