diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-03-29 15:25:05 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-05-03 15:17:30 +0400 |
commit | 4d14cb0cd7868d11091acf5c930982cae4e3489c (patch) | |
tree | b04526babcdc90caa67d374211e71dc0389187de /hw/misc | |
parent | c6d3bcb4b91e9ebf08f3afb8759760a9dbb2b744 (diff) |
Use g_unix_set_fd_nonblocking()
API available since glib 2.30. It also preserves errno.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/misc')
-rw-r--r-- | hw/misc/ivshmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index e7c0099bda..8270db53cd 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -537,7 +537,7 @@ static void process_msg_connect(IVShmemState *s, uint16_t posn, int fd, IVSHMEM_DPRINTF("eventfds[%d][%d] = %d\n", posn, vector, fd); event_notifier_init_fd(&peer->eventfds[vector], fd); - fcntl_setfl(fd, O_NONBLOCK); /* msix/irqfd poll non block */ + g_unix_set_fd_nonblocking(fd, true, NULL); /* msix/irqfd poll non block */ if (posn == s->vm_id) { setup_interrupt(s, vector, errp); |