From b34d259516ae2377186171c58c3bc535eb9ed263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 28 May 2012 00:53:20 +0200 Subject: libqtest: Fix socket_accept() to pass address_len MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Stefan Hajnoczi --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/libqtest.c') diff --git a/tests/libqtest.c b/tests/libqtest.c index 6d333ef0ac..1d73fd1953 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); -- cgit v1.2.3