mirror of
https://github.com/ziglang/zig.git
synced 2025-12-24 15:13:08 +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) {
|
if (native_os == .windows) {
|
||||||
try t.checkCancel();
|
try t.checkCancel();
|
||||||
const index = ws2_32.if_nametoindex(&name.bytes);
|
@panic("TODO");
|
||||||
if (index == 0) return error.InterfaceNotFound;
|
|
||||||
return .{ .index = index };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (builtin.link_libc) {
|
if (builtin.link_libc) {
|
||||||
|
|||||||
@ -2161,7 +2161,3 @@ pub extern "ws2_32" fn getnameinfo(
|
|||||||
ServiceBufferName: u32,
|
ServiceBufferName: u32,
|
||||||
Flags: i32,
|
Flags: i32,
|
||||||
) callconv(.winapi) 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