blob: 6b855cc08634e691867ffbf29d42b67ef290ee2a [file] [log] [blame]
// NACL MOD TRACK "third_party/nacl-glibc/sysdeps/nacl/mmap.c"
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
#include <irt_syscalls.h>
void *__mmap(void *addr, size_t len, int prot, int flags,
int fd, off_t offset) {
int result = __nacl_irt_mmap (&addr, len, prot, flags, fd, offset);
if (result != 0) {
errno = result;
return MAP_FAILED;
}
return addr;
}
weak_alias (__mmap, mmap)