From 0b17a6561ecebd5d0bbc5a28074158ccf03775e9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 5 Jan 2008 10:40:03 +0000 Subject: if an arch does not provide __NR_mmap, fall back to __NR_mmap2 (this just generalizes what Blackfin was already doing) --- libc/sysdeps/linux/bfin/mmap.c | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 libc/sysdeps/linux/bfin/mmap.c (limited to 'libc/sysdeps/linux/bfin/mmap.c') 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 -#include -#include -#include -#include - -#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) -- cgit v1.2.3