From f66b0497cfa75a3ae3067ee5704ad85dc9745b9f Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 2 Aug 2023 22:19:39 +0200 Subject: [PATCH] libc: Add support for mmap()'s new syscall format --- libc/src/sys/mman.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libc/src/sys/mman.cpp b/libc/src/sys/mman.cpp index ca38884b..2f855366 100644 --- a/libc/src/sys/mman.cpp +++ b/libc/src/sys/mman.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -6,9 +7,10 @@ extern "C" { - void* mmap(void* addr, size_t len, int prot, int flags, int, off_t) + void* mmap(void* addr, size_t len, int prot, int flags, int fd, off_t offset) { - long rc = syscall(SYS_mmap, addr, len, prot, flags); + const mmap_params params { addr, len, prot, flags, fd, offset }; + long rc = syscall(SYS_mmap, ¶ms); __errno_return(rc, void*); }