Index: qemu-arm-eabi/linux-user/syscall.c =================================================================== --- qemu-arm-eabi.orig/linux-user/syscall.c 2008-10-09 15:04:44.000000000 -0300 +++ qemu-arm-eabi/linux-user/syscall.c 2008-10-09 15:21:27.000000000 -0300 @@ -1267,7 +1267,7 @@ static abi_long do_sendrecvmsg(int fd, abi_ulong target_msg, int flags, int send) { - abi_long ret; + abi_long ret, len; struct target_msghdr *msgp; struct msghdr msg; int count; @@ -1308,8 +1308,12 @@ ret = get_errno(sendmsg(fd, &msg, flags)); } else { ret = get_errno(recvmsg(fd, &msg, flags)); - if (!is_error(ret)) + if (!is_error(ret)) { + len = ret; ret = host_to_target_cmsg(msgp, &msg); + if (!is_error(ret)) + ret = len; + } } unlock_iovec(vec, target_vec, count, !send); fail: