summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/fcntl.cpp
diff options
context:
space:
mode:
authorgggggg-gggggg <88845056+gggggg-gggggg@users.noreply.github.com>2022-07-03 01:02:45 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-10 20:09:11 +0200
commitd728017578c18ebcf6af9a6da8182ee15a597f75 (patch)
tree1610890afdd5e0809c984374c7256e0463dfa14d /Userland/Libraries/LibC/fcntl.cpp
parent656528f483f6d6bda3d17f035f5690b18b960f2a (diff)
downloadserenity-d728017578c18ebcf6af9a6da8182ee15a597f75.zip
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 :^)
Diffstat (limited to 'Userland/Libraries/LibC/fcntl.cpp')
-rw-r--r--Userland/Libraries/LibC/fcntl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/fcntl.cpp b/Userland/Libraries/LibC/fcntl.cpp
index 4a421178d0..e67a82d357 100644
--- a/Userland/Libraries/LibC/fcntl.cpp
+++ b/Userland/Libraries/LibC/fcntl.cpp
@@ -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);