Jelajahi Sumber

Since __syscall_error is a C func, we need to store the syscall return value
in the appropriate register. Otherwise, errno is set to random garbage.

Manuel Novoa III 19 tahun lalu
induk
melakukan
47167cdc5d
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      libc/sysdeps/linux/mips/clone.S

+ 5 - 0
libc/sysdeps/linux/mips/clone.S

@@ -72,6 +72,11 @@ __clone:
 	/* Something bad happened -- no child created */
 error:
 	addiu		sp,32
+
+	/* uClibc change -- start */
+	move		a0,v0		/* Pass return val to C function. */
+	/* uClibc change -- stop */
+
 #ifdef __PIC__
 	la		t9,__syscall_error
 	jr		t9