On Fri, Apr 22, 2022 at 12:36:37PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > API available since glib 2.30. It also preserves errno. > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > --- > hw/misc/ivshmem.c | 2 +- > util/event_notifier-posix.c | 6 ++---- > util/main-loop.c | 2 +- > 3 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c > index e7c0099bdaf6..a1cd3dcc51cf 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 > */
Does glib require us to use their non-standard TRUE, or can we merely pass true and rely on C promotion rules to make the code look nicer? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org