From 43729917c23e5bc2bca66e2799063a4ae9e274f3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 14 Jan 2006 06:59:09 +0000 Subject: make sure we set errno properly --- libc/sysdeps/linux/m68k/__syscall_error.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libc') 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; } -- cgit v1.2.3