summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/m68k/__syscall_error.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/m68k/__syscall_error.c b/libc/sysdeps/linux/m68k/__syscall_error.c
index de65a1f39..d6ac82c12 100644
--- a/libc/sysdeps/linux/m68k/__syscall_error.c
+++ b/libc/sysdeps/linux/m68k/__syscall_error.c
@@ -22,8 +22,9 @@
/* This routine is jumped to by all the syscall handlers, to stash
* an error number into errno. */
-int attribute_hidden __syscall_error(int err_no)
+int attribute_hidden __syscall_error(void)
{
- __set_errno(err_no);
+ register int err_no asm("%d0");
+ __set_errno(-err_no);
return -1;
}