summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/bfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-01-05 10:40:03 +0000
committerMike Frysinger <vapier@gentoo.org>2008-01-05 10:40:03 +0000
commit0b17a6561ecebd5d0bbc5a28074158ccf03775e9 (patch)
tree2c2ca8183a020a70f150f21ec835e1194a289318 /libc/sysdeps/linux/bfin
parent124ec188720b6bdea85ade49e7ea195161b12fce (diff)
if an arch does not provide __NR_mmap, fall back to __NR_mmap2 (this just generalizes what Blackfin was already doing)
Diffstat (limited to 'libc/sysdeps/linux/bfin')
-rw-r--r--libc/sysdeps/linux/bfin/Makefile.arch2
-rw-r--r--libc/sysdeps/linux/bfin/mmap.c24
2 files changed, 1 insertions, 25 deletions
diff --git a/libc/sysdeps/linux/bfin/Makefile.arch b/libc/sysdeps/linux/bfin/Makefile.arch
index fa62cc610..7a428b380 100644
--- a/libc/sysdeps/linux/bfin/Makefile.arch
+++ b/libc/sysdeps/linux/bfin/Makefile.arch
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c bsdsetjmp.c clone.c syscall.c mmap.c
+CSRC := brk.c bsdsetjmp.c clone.c syscall.c
SSRC := __longjmp.S setjmp.S bsd-_setjmp.S vfork.S
diff --git a/libc/sysdeps/linux/bfin/mmap.c b/libc/sysdeps/linux/bfin/mmap.c
deleted file mode 100644
index 41140df0e..000000000
--- a/libc/sysdeps/linux/bfin/mmap.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Use new style mmap for bfin */
-
-#include <unistd.h>
-#include <errno.h>
-#include <sys/mman.h>
-#include <sys/syscall.h>
-#include <asm/page.h>
-
-#define __NR___syscall_mmap2 __NR_mmap2
-inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
- size_t, len, int, prot, int, flags, int, fd, off_t, offset);
-
-libc_hidden_proto(mmap)
-
-__ptr_t mmap(__ptr_t addr, size_t len, int prot,
- int flags, int fd, __off_t offset)
-{
- if (offset & ~PAGE_MASK) {
- return NULL;
- }
- return __syscall_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
-}
-
-libc_hidden_def(mmap)