| ... | ... | @@ -1214,6 +1214,10 @@ pub const Reader = struct { |
| 1214 | 1214 | return err; |
| 1215 | 1215 | } |
| 1216 | 1216 | } |
| 1217 | if (posix.Stat == void) { |
| 1218 | r.size_err = error.Streaming; |
| 1219 | return error.Streaming; |
| 1220 | } |
| 1217 | 1221 | if (stat(r.file)) |st| { |
| 1218 | 1222 | if (st.kind == .file) { |
| 1219 | 1223 | r.size = st.size; |
| ... | ... | @@ -1236,6 +1240,10 @@ pub const Reader = struct { |
| 1236 | 1240 | setPosAdjustingBuffer(r, @intCast(@as(i64, @intCast(r.pos)) + offset)); |
| 1237 | 1241 | }, |
| 1238 | 1242 | .streaming, .streaming_reading => { |
| 1243 | if (posix.SEEK == void) { |
| 1244 | r.seek_err = error.Unseekable; |
| 1245 | return error.Unseekable; |
| 1246 | } |
| 1239 | 1247 | const seek_err = r.seek_err orelse e: { |
| 1240 | 1248 | if (posix.lseek_CUR(r.file.handle, offset)) |_| { |
| 1241 | 1249 | setPosAdjustingBuffer(r, @intCast(@as(i64, @intCast(r.pos)) + offset)); |