Fixing syscalls to new seterrno and setretval.