aboutsummaryrefslogtreecommitdiff
path: root/slirp/misc.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-01-17 15:43:41 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-02-07 15:49:08 +0200
commit848c7092ba69318e7bc72a9c0c1f6cd443c439ad (patch)
treea5f4a80e8be467676ce6d8dce38dc4dc6669bf8d /slirp/misc.c
parent707bd47ef3cf778b691d9e0df2ede3ec4c3fe771 (diff)
slirp: replace qemu_set_nonblock()
Replace qemu_set_nonblock() with slirp_set_nonblock() qemu_set_nonblock() does some event registration with the main loop. Add a new callback register_poll_fd() for that reason. Always build the fd-register stub, to avoid #if WIN32. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/misc.c')
-rw-r--r--slirp/misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/slirp/misc.c b/slirp/misc.c
index 32ec02a525..4ee20a10e4 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -163,7 +163,8 @@ fork_exec(struct socket *so, const char *ex)
slirp_socket_set_fast_reuse(so->s);
opt = 1;
slirp_setsockopt(so->s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int));
- qemu_set_nonblock(so->s);
+ slirp_set_nonblock(so->s);
+ so->slirp->cb->register_poll_fd(so->s);
return 1;
}