1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +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

@ -294,7 +294,7 @@ public:
ErrorOr<FlatPtr> sys$open(Userspace<const Syscall::SC_open_params*>);
ErrorOr<FlatPtr> sys$close(int fd);
ErrorOr<FlatPtr> sys$read(int fd, Userspace<u8*>, size_t);
ErrorOr<FlatPtr> sys$pread(int fd, Userspace<u8*>, size_t, off_t);
ErrorOr<FlatPtr> sys$pread(int fd, Userspace<u8*>, size_t, Userspace<off_t*>);
ErrorOr<FlatPtr> sys$readv(int fd, Userspace<const struct iovec*> iov, int iov_count);
ErrorOr<FlatPtr> sys$write(int fd, Userspace<const u8*>, size_t);
ErrorOr<FlatPtr> sys$writev(int fd, Userspace<const struct iovec*> iov, int iov_count);