We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 231b376 commit 5cec5c3Copy full SHA for 5cec5c3
lib/std/x/os/net.zig
@@ -17,10 +17,10 @@ const native_os = std.Target.current.os;
17
/// an error if either resolution fails, or if the interface name is
18
/// too long.
19
pub fn resolveScopeID(name: []const u8) !u32 {
20
- if (comptime @hasDecl(os, "IFNAMESIZE")) {
+ if (@hasDecl(os, "IFNAMESIZE")) {
21
if (name.len >= os.IFNAMESIZE - 1) return error.NameTooLong;
22
23
- if (comptime native_os.tag == .windows) {
+ if (native_os.tag == .windows) {
24
var interface_name: [os.IFNAMESIZE]u8 = undefined;
25
mem.copy(u8, &interface_name, name);
26
interface_name[name.len] = 0;
0 commit comments