1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

Kernel+LibC+LibCore: Pass fcntl extra argument as pointer-sized variable

The extra argument to fcntl is a pointer in the case of F_GETLK/F_SETLK
and we were pulling out a u32, leading to pointer truncation on x86_64.
Among other things, this fixes Assistant on x86_64 :^)
This commit is contained in:
gggggg-gggggg 2022-07-03 01:02:45 +02:00 committed by Andreas Kling
parent 656528f483
commit d728017578
4 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@
namespace Kernel {
ErrorOr<FlatPtr> Process::sys$fcntl(int fd, int cmd, u32 arg)
ErrorOr<FlatPtr> Process::sys$fcntl(int fd, int cmd, uintptr_t arg)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
TRY(require_promise(Pledge::stdio));