1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:47:35 +00:00

Kernel+LibC: Pass off_t to pread() via a pointer

`off_t` is a 64-bit signed integer, so passing it in a register on i686
is not the best idea.

This fix gets us one step closer to making the LLVM port work.
This commit is contained in:
Daniel Bertalan 2021-11-13 09:28:56 +01:00 committed by Andreas Kling
parent 7f8dc395c1
commit 648a139af3
3 changed files with 5 additions and 3 deletions

View file

@ -296,7 +296,7 @@ ssize_t read(int fd, void* buf, size_t count)
ssize_t pread(int fd, void* buf, size_t count, off_t offset)
{
int rc = syscall(SC_pread, fd, buf, count, offset);
int rc = syscall(SC_pread, fd, buf, count, &offset);
__RETURN_WITH_ERRNO(rc, rc, -1);
}