aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/socket-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/socket-helpers.c')
-rw-r--r--tests/unit/socket-helpers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/socket-helpers.c b/tests/unit/socket-helpers.c
index 37db24f..46d2ff1 100644
--- a/tests/unit/socket-helpers.c
+++ b/tests/unit/socket-helpers.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "socket-helpers.h"
@@ -88,7 +89,8 @@ static int socket_can_bind_connect(const char *hostname, int family)
goto cleanup;
}
- qemu_socket_set_nonblock(cfd);
+ qemu_set_blocking(cfd, false, &error_abort);
+
if (connect(cfd, (struct sockaddr *)&ss, sslen) < 0) {
if (errno == EINPROGRESS) {
check_soerr = true;