libqtest: Fix socket_accept() to pass address_len
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 <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
fc8c5b8c41
commit
b34d259516
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user