From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYmL3-0002pP-CS for qemu-devel@nongnu.org; Sun, 27 May 2012 18:53:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYmL1-0007c4-O7 for qemu-devel@nongnu.org; Sun, 27 May 2012 18:53:28 -0400 Received: from mout.web.de ([212.227.15.4]:61318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYmL1-0007bo-F7 for qemu-devel@nongnu.org; Sun, 27 May 2012 18:53:27 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 28 May 2012 00:53:20 +0200 Message-Id: <1338159200-7502-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws accept() expects address_len to point to the length of the sockaddr on input. Initialize it accordingly. Resolves an assertion due to EFAULT on illumos. Signed-off-by: Andreas Färber --- tests/libqtest.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 6d333ef..1d73fd1 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -74,6 +74,7 @@ static int socket_accept(int sock) socklen_t addrlen; int ret; + addrlen = sizeof(addr); do { ret = accept(sock, (struct sockaddr *)&addr, &addrlen); } while (ret == -1 && errno == EINTR); -- 1.7.7