diff options
author | Khem Raj <kraj@mvista.com> | 2007-05-15 00:37:02 +0000 |
---|---|---|
committer | Khem Raj <kraj@mvista.com> | 2007-05-15 00:37:02 +0000 |
commit | 22a4424b0b32a898950b917af834967c2672fb9e (patch) | |
tree | 5067067932182a7a0819ec153a200e825167a457 /libc/sysdeps/linux/common | |
parent | 4bad09584733d17678511f5f8fa392a671f61ece (diff) |
Fix arm mmap when using mmap2 syscall. Fixes bug #1303
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r-- | libc/sysdeps/linux/common/mmap64.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c index 2cf200dc9..85b0a6f17 100644 --- a/libc/sysdeps/linux/common/mmap64.c +++ b/libc/sysdeps/linux/common/mmap64.c @@ -58,8 +58,13 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t __set_errno(EINVAL); return MAP_FAILED; } - - return __syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)); +#ifdef __USE_FILE_OFFSET64 + return __syscall_mmap2(addr, len, prot, flags, + fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT)); +#else + return __syscall_mmap2(addr, len, prot, flags, + fd,((__ulong_t)offset >> MMAP2_PAGE_SHIFT)); +#endif } # endif |