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

@ -19,7 +19,7 @@ int fcntl(int fd, int cmd, ...)
{
va_list ap;
va_start(ap, cmd);
u32 extra_arg = va_arg(ap, u32);
uintptr_t extra_arg = va_arg(ap, uintptr_t);
int rc = syscall(SC_fcntl, fd, cmd, extra_arg);
va_end(ap);
__RETURN_WITH_ERRNO(rc, rc, -1);