diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-01-17 01:01:08 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-01-17 01:01:08 +0000 |
commit | 16816bb7b4bda33c9077f117a6f1a7588367ed38 (patch) | |
tree | 358c16cc82d1f269b05b717db769bc72b76790d3 | |
parent | 7be4ed06fb526fff91563d8e81c429e247d41aba (diff) |
use the 6-arg version of mmap where available
-rw-r--r-- | libc/sysdeps/linux/common/mmap.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c index 29d78a712..6acb73980 100644 --- a/libc/sysdeps/linux/common/mmap.c +++ b/libc/sysdeps/linux/common/mmap.c @@ -15,7 +15,14 @@ libc_hidden_proto(mmap) -#define __NR__mmap __NR_mmap +#ifdef __UCLIBC_MMAP_HAS_6_ARGS__ + +_syscall6(void *, mmap, void *, start, size_t, length, + int, prot, int, flags, int, fd, off_t, offset); + +#else + +# define __NR__mmap __NR_mmap static inline _syscall1(__ptr_t, _mmap, unsigned long *, buffer); __ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset) @@ -30,5 +37,8 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot, buffer[5] = (unsigned long) offset; return (__ptr_t) _mmap(buffer); } + +#endif + libc_hidden_def(mmap) #endif |