From 87b9e744dda465ecf7663e2463066ea26a44e63a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 25 Feb 2020 03:43:21 -0500 Subject: update std lib to new Target API --- lib/std/os.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/std/os.zig') diff --git a/lib/std/os.zig b/lib/std/os.zig index 6e96413d78..9f349e7dc4 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -650,7 +650,7 @@ pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!void { /// On Windows, if the application has a global event loop enabled, I/O Completion Ports are /// used to perform the I/O. `error.WouldBlock` is not possible on Windows. pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) WriteError!void { - if (comptime std.Target.current.isWindows()) { + if (std.Target.current.os.tag == .windows) { return windows.WriteFile(fd, bytes, offset); } @@ -739,7 +739,7 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) WriteError!void } } - if (comptime std.Target.current.isWindows()) { + if (std.Target.current.os.tag == .windows) { var off = offset; for (iov) |item| { try pwrite(fd, item.iov_base[0..item.iov_len], off); -- cgit v1.2.3