فهرست منبع

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 20 سال پیش
والد
کامیت
47167cdc5d
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  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