summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-11 08:29:22 +0000
committerEric Andersen <andersen@codepoet.org>2001-10-11 08:29:22 +0000
commit5c12c8eecd5f2e06c200651e90befe85efcf166f (patch)
treedbaed54145d28357e3b145ad8631529ffd0c2344 /libc/sysdeps/linux/common
parenta924265e43cf2fcad97fc9489da482a27b0faf93 (diff)
Patch from Miles Bader <miles@lsi.nec.co.jp> to support the v850.
He sent this patch to me a month ago, but I forgot to apply it...
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/syscalls.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c
index 05179548d..0d470db8c 100644
--- a/libc/sysdeps/linux/common/syscalls.c
+++ b/libc/sysdeps/linux/common/syscalls.c
@@ -2,7 +2,7 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2000 by Lineo, inc. Written by Erik Andersen
+ * Copyright (C) 2000, 2001 by Lineo, inc. Written by Erik Andersen
* <andersen@lineo.com>, <andersee@debian.org>
*
* This program is free software; you can redistribute it and/or modify it
@@ -635,13 +635,16 @@ int reboot(int flag)
//#define __NR_readdir 89
//#define __NR_mmap 90
-#ifdef L__mmap
+#ifdef L_mmap
#define __NR__mmap __NR_mmap
#ifdef __STR_NR_mmap
#define __STR_NR__mmap __STR_NR_mmap
#endif
#include <unistd.h>
#include <sys/mman.h>
+
+#if __UCLIBC_OLD_STYLE_MMAP__
+
extern __ptr_t _mmap(unsigned long *buffer);
_syscall1(__ptr_t, _mmap, unsigned long *, buffer);
@@ -659,6 +662,15 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot,
buffer[5] = (unsigned long) offset;
return (__ptr_t) _mmap(buffer);
}
+
+#else /* !__UCLIBC_OLD_STYLE_MMAP__ */
+
+_syscall6(__ptr_t, mmap,
+ __ptr_t, addr, size_t, len, int, prot,
+ int, flags, int, fd, __off_t, offset);
+
+#endif /* __UCLIBC_OLD_STYLE_MMAP__ */
+
#endif
//#define __NR_munmap 91