summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-09 00:30:56 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-09 00:30:56 +0000
commit5303a70090343a1d45886d70265d02f50b86627b (patch)
tree9b066cf96fd46e1e1e91d1b213e25a25b8686ec3 /libc
parentd29acb5c67ffc02ee011f6e3ae4eab0f959aac1f (diff)
the generic mmap.c is not good enough for us, we need the syscall6() version
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/x86_64/Makefile2
-rw-r--r--libc/sysdeps/linux/x86_64/mmap.c17
2 files changed, 18 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/x86_64/Makefile b/libc/sysdeps/linux/x86_64/Makefile
index 167ebb167..3c48d9e0b 100644
--- a/libc/sysdeps/linux/x86_64/Makefile
+++ b/libc/sysdeps/linux/x86_64/Makefile
@@ -27,7 +27,7 @@ CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
SSRC=__longjmp.S vfork.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S clone.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c sigaction.c __syscall_error.c
+CSRC=brk.c sigaction.c __syscall_error.c mmap.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(SOBJS) $(COBJS)
diff --git a/libc/sysdeps/linux/x86_64/mmap.c b/libc/sysdeps/linux/x86_64/mmap.c
new file mode 100644
index 000000000..117d93ddc
--- /dev/null
+++ b/libc/sysdeps/linux/x86_64/mmap.c
@@ -0,0 +1,17 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * mmap() for uClibc/x86_64
+ *
+ * Copyright (C) 2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
+ *
+ * GNU Library General Public License (LGPL) version 2 or later.
+ */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/syscall.h>
+
+_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
+ int, flags, int, fd, off_t, offset);