diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/mmap64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/mmap64.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c index 4dbe28b9c4..0b160b6f6b 100644 --- a/sysdeps/unix/sysv/linux/mmap64.c +++ b/sysdeps/unix/sysv/linux/mmap64.c @@ -46,9 +46,15 @@ __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset) } #endif if (offset & ((1 << page_shift) - 1)) - return INLINE_SYSCALL_ERROR_RETURN (-EINVAL, void *, MAP_FAILED); - return INLINE_SYSCALL_RETURN (mmap2, 6, void *, addr, - len, prot, flags, fd, - (off_t) (offset >> page_shift)); + { + __set_errno (EINVAL); + return MAP_FAILED; + } + void *result; + result = (void *) + INLINE_SYSCALL (mmap2, 6, addr, + len, prot, flags, fd, + (off_t) (offset >> page_shift)); + return result; } weak_alias (__mmap64, mmap64) |