diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-08-27 00:28:17 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-08-27 00:28:17 -0400 |
| commit | b59aa7b906c984f182b8abc8fd3e146d956a799d (patch) | |
| tree | 1bf098cca4430b8afda2ab0086b48494ad381636 /std/io.zig | |
| parent | 29a418c9d5b3b9c78b707e5b6a119d48ecce9a6a (diff) | |
| download | zig-b59aa7b906c984f182b8abc8fd3e146d956a799d.tar.gz zig-b59aa7b906c984f182b8abc8fd3e146d956a799d.zip | |
fixups to linux build
Diffstat (limited to 'std/io.zig')
| -rw-r--r-- | std/io.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/io.zig b/std/io.zig index 0e582e44e5..8a93b3df2c 100644 --- a/std/io.zig +++ b/std/io.zig @@ -328,7 +328,7 @@ pub const InStream = struct { return mem.readInt(input_slice, T, is_be); } - pub fn seekForward(is: &InStream, amount: usize) -> %void { + pub fn seekForward(is: &InStream, amount: isize) -> %void { switch (builtin.os) { Os.linux, Os.darwin => { const result = system.lseek(is.fd, amount, system.SEEK_CUR); @@ -351,7 +351,7 @@ pub const InStream = struct { pub fn seekTo(is: &InStream, pos: usize) -> %void { switch (builtin.os) { Os.linux, Os.darwin => { - const result = system.lseek(is.fd, pos, system.SEEK_SET); + const result = system.lseek(is.fd, @bitCast(isize, pos), system.SEEK_SET); const err = system.getErrno(result); if (err > 0) { return switch (err) { @@ -390,7 +390,7 @@ pub const InStream = struct { } pub fn getEndPos(is: &InStream) -> %usize { - var stat: system.stat = undefined; + var stat: system.Stat = undefined; const err = system.getErrno(system.fstat(is.fd, &stat)); if (err > 0) { return switch (err) { |
