diff options
Diffstat (limited to 'src/io/io_darwin.zig')
-rw-r--r-- | src/io/io_darwin.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/io/io_darwin.zig b/src/io/io_darwin.zig index 226a4d284..cb2d15afb 100644 --- a/src/io/io_darwin.zig +++ b/src/io/io_darwin.zig @@ -1350,6 +1350,12 @@ pub fn read( struct { fn doOperation(op: anytype) ReadError!usize { while (true) { + if (op.positional) { + const rc = os.system.lseek(op.fd, @intCast(op.offset), 0); + if (rc == -1) { + return error.Unseekable; + } + } const rc = os.system.read( op.fd, op.buf, |