diff options
Diffstat (limited to 'src/copy_file.zig')
-rw-r--r-- | src/copy_file.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/copy_file.zig b/src/copy_file.zig index f60638f9f..7fe6dddb1 100644 --- a/src/copy_file.zig +++ b/src/copy_file.zig @@ -8,7 +8,7 @@ const CopyFileError = error{SystemResources} || os.CopyFileRangeError || os.Send // The copy starts at offset 0, the initial offsets are preserved. // No metadata is transferred over. pub fn copy(fd_in: os.fd_t, fd_out: os.fd_t) CopyFileError!void { - if (comptime std.Target.current.isDarwin()) { + if (comptime @import("builtin").target.isDarwin()) { const rc = os.system.fcopyfile(fd_in, fd_out, null, os.system.COPYFILE_DATA); switch (os.errno(rc)) { .SUCCESS => return, @@ -21,7 +21,7 @@ pub fn copy(fd_in: os.fd_t, fd_out: os.fd_t) CopyFileError!void { } } - if (comptime std.Target.current.os.tag == .linux) { + if (comptime @import("builtin").target.os.tag == .linux) { // Try copy_file_range first as that works at the FS level and is the // most efficient method (if available). var offset: u64 = 0; |