mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
b7e5374637
commit
25657fc6c1
14 changed files with 89 additions and 89 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue