summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-11-28 18:28:41 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-11-28 18:28:41 +0000
commit8c00735b3121950263c47ee7330aad181c513d9a (patch)
tree44794a4754c2539ff9c92701b3a477ef0b67d593 /libc
parent53d8027c8096f22aa32c1faa59dd09dc8b7b3c9c (diff)
Add sysmips(), based on a patch by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/mips/Makefile2
-rw-r--r--libc/sysdeps/linux/mips/sys/sysmips.h2
-rw-r--r--libc/sysdeps/linux/mips/sysmips.c5
3 files changed, 7 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/mips/Makefile b/libc/sysdeps/linux/mips/Makefile
index 97ec0f88a..e3c344e48 100644
--- a/libc/sysdeps/linux/mips/Makefile
+++ b/libc/sysdeps/linux/mips/Makefile
@@ -27,7 +27,7 @@ CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
SSRC=bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S fork.S syscall.S pipe.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
-CSRC=__longjmp.c brk.c vfork.c setjmp_aux.c _mmap.c __syscall_error.c cacheflush.c pread_write.c
+CSRC=__longjmp.c brk.c vfork.c setjmp_aux.c _mmap.c __syscall_error.c cacheflush.c pread_write.c sysmips.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(SOBJS) $(MOBJ) $(COBJS)
diff --git a/libc/sysdeps/linux/mips/sys/sysmips.h b/libc/sysdeps/linux/mips/sys/sysmips.h
index 642a31629..7760c755a 100644
--- a/libc/sysdeps/linux/mips/sys/sysmips.h
+++ b/libc/sysdeps/linux/mips/sys/sysmips.h
@@ -28,7 +28,7 @@
__BEGIN_DECLS
-extern int sysmips (__const int cmd, __const int arg1,
+extern int sysmips (__const int cmd, __const long arg1,
__const int arg2, __const int arg3) __THROW;
__END_DECLS
diff --git a/libc/sysdeps/linux/mips/sysmips.c b/libc/sysdeps/linux/mips/sysmips.c
new file mode 100644
index 000000000..69b462c33
--- /dev/null
+++ b/libc/sysdeps/linux/mips/sysmips.c
@@ -0,0 +1,5 @@
+#include <errno.h>
+#include <sys/syscall.h>
+#include <sys/sysmips.h>
+
+_syscall4(int, sysmips, const int, cmd, const long, arg1, const int, arg2, const int, arg3);