aboutsummaryrefslogtreecommitdiff
path: root/hw/hyperv/syndbg.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-02-21 16:48:01 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 15:39:31 +0400
commit25657fc6c1b693096e2ceadaa53cd10c1e81c8d9 (patch)
tree02de623f13a1d265022ddbdbf7433eb33f929d23 /hw/hyperv/syndbg.c
parentb7e5374637daffa49657be2c559a0566836a172f (diff)
win32: replace closesocket() with close() wrapper
Use a close() wrapper instead, so that we don't need to worry about closesocket() vs close() anymore, let's hope. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-Id: <20230221124802.4103554-17-marcandre.lureau@redhat.com>
Diffstat (limited to 'hw/hyperv/syndbg.c')
-rw-r--r--hw/hyperv/syndbg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c
index 94fe1b534b..065e12fb1e 100644
--- a/hw/hyperv/syndbg.c
+++ b/hw/hyperv/syndbg.c
@@ -340,7 +340,7 @@ static void hv_syndbg_realize(DeviceState *dev, Error **errp)
syndbg->servaddr.sin_family = AF_INET;
if (connect(syndbg->socket, (struct sockaddr *)&syndbg->servaddr,
sizeof(syndbg->servaddr)) < 0) {
- closesocket(syndbg->socket);
+ close(syndbg->socket);
error_setg(errp, "%s failed to connect to socket", TYPE_HV_SYNDBG);
return;
}
@@ -357,7 +357,7 @@ static void hv_syndbg_unrealize(DeviceState *dev)
if (syndbg->socket > 0) {
qemu_set_fd_handler(syndbg->socket, NULL, NULL, NULL);
- closesocket(syndbg->socket);
+ close(syndbg->socket);
}
}