mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking()
Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d640b59eb3
commit
22e135fca3
6 changed files with 9 additions and 21 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue