From 47167cdc5d0ef7fbbb1a0c65934e0fa8acb89833 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Sat, 23 Jul 2005 14:02:57 +0000 Subject: 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. --- libc/sysdeps/linux/mips/clone.S | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libc/sysdeps/linux/mips/clone.S') diff --git a/libc/sysdeps/linux/mips/clone.S b/libc/sysdeps/linux/mips/clone.S index 3b879040a..079d2bef2 100644 --- a/libc/sysdeps/linux/mips/clone.S +++ b/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 -- cgit v1.2.3