From 21ac728498c1d529dd0abde1054703946be163da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 21 Feb 2023 16:47:57 +0400 Subject: [PATCH] slirp: unregister the win32 SOCKET MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Presumably, this is what should happen when the SOCKET is to be removed. (it probably worked until now because closesocket() does it implicitly, but we never now how the slirp library could use the SOCKET later) Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-13-marcandre.lureau@redhat.com> --- net/slirp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/slirp.c b/net/slirp.c index 0730a935ba..a7c35778a6 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -259,7 +259,9 @@ static void net_slirp_register_poll_fd(int fd, void *opaque) static void net_slirp_unregister_poll_fd(int fd, void *opaque) { - /* no qemu_fd_unregister */ +#ifdef WIN32 + qemu_socket_unselect(fd, NULL); +#endif } static void net_slirp_notify(void *opaque)