libc: Add support for mmap()'s new syscall format
This commit is contained in:
parent
2572695c8d
commit
f66b0497cf
@ -1,4 +1,5 @@
|
||||
#include <bits/errno-return.h>
|
||||
#include <bits/mmap.h>
|
||||
#include <luna/Heap.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/syscall.h>
|
||||
@ -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*);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user