Forráskód Böngészése

make sure we set errno properly

Mike Frysinger 18 éve
szülő
commit
43729917c2
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      libc/sysdeps/linux/m68k/__syscall_error.c

+ 3 - 2
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;
 }