diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-02-25 03:43:21 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-02-28 14:51:54 -0500 |
| commit | 87b9e744dda465ecf7663e2463066ea26a44e63a (patch) | |
| tree | e3c09dca4b8a06656029b1034da24ed9b7507299 /lib/std/os.zig | |
| parent | d4f375c46be2e509ee9161b0577d8a25d6620b3e (diff) | |
| download | zig-87b9e744dda465ecf7663e2463066ea26a44e63a.tar.gz zig-87b9e744dda465ecf7663e2463066ea26a44e63a.zip | |
update std lib to new Target API
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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); |
