From 701d4bc80b8cbb649364e8ecf86ed9cea8af739d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 23 Oct 2025 09:48:16 -0700 Subject: [PATCH] objcopy: update for std.Io API --- lib/compiler/objcopy.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compiler/objcopy.zig b/lib/compiler/objcopy.zig index 3e8c4a508a..ee7456a87c 100644 --- a/lib/compiler/objcopy.zig +++ b/lib/compiler/objcopy.zig @@ -156,7 +156,7 @@ fn cmdObjCopy(gpa: Allocator, arena: Allocator, args: []const []const u8) !void const stat = input_file.stat() catch |err| fatal("failed to stat {s}: {t}", .{ input, err }); - var in: File.Reader = .initSize(input_file, io, &input_buffer, stat.size); + var in: File.Reader = .initSize(input_file.adaptToNewApi(), io, &input_buffer, stat.size); const elf_hdr = std.elf.Header.read(&in.interface) catch |err| switch (err) { error.ReadFailed => fatal("unable to read {s}: {t}", .{ input, in.err.? }), @@ -221,7 +221,7 @@ fn cmdObjCopy(gpa: Allocator, arena: Allocator, args: []const []const u8) !void try out.end(); if (listen) { - var stdin_reader = fs.File.stdin().reader(&stdin_buffer); + var stdin_reader = fs.File.stdin().reader(io, &stdin_buffer); var stdout_writer = fs.File.stdout().writer(&stdout_buffer); var server = try Server.init(.{ .in = &stdin_reader.interface,