diff --git a/lib/std/net.zig b/lib/std/net.zig index 4484821f9..a3f9c1c6d 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -437,7 +437,7 @@ pub fn getAddressList(allocator: *mem.Allocator, name: []const u8, port: u16) !* const name_c = try std.cstr.addNullByte(allocator, name); defer allocator.free(name_c); - const port_c = try std.fmt.allocPrint(allocator, "{}\x00", port); + const port_c = try std.fmt.allocPrint(allocator, "{}\x00", .{port}); defer allocator.free(port_c); const hints = os.addrinfo{