From 22e135fca3f2512f43d39efab49067660e365e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 25 Apr 2022 11:56:42 +0400 Subject: Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- tests/qtest/fuzz/virtio_net_fuzz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/qtest/fuzz') diff --git a/tests/qtest/fuzz/virtio_net_fuzz.c b/tests/qtest/fuzz/virtio_net_fuzz.c index 3df78d9c1c..c2c15f07f0 100644 --- a/tests/qtest/fuzz/virtio_net_fuzz.c +++ b/tests/qtest/fuzz/virtio_net_fuzz.c @@ -151,7 +151,7 @@ static void *virtio_net_test_setup_socket(GString *cmd_line, void *arg) { int ret = socketpair(PF_UNIX, SOCK_STREAM, 0, sockfds); g_assert_cmpint(ret, !=, -1); - fcntl(sockfds[0], F_SETFL, O_NONBLOCK); + g_unix_set_fd_nonblocking(sockfds[0], true, NULL); sockfds_initialized = true; g_string_append_printf(cmd_line, " -netdev socket,fd=%d,id=hs0 ", sockfds[1]); -- cgit v1.2.3