mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13: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
|
@ -59,7 +59,7 @@ qcrypto_afalg_socket_bind(const char *type, const char *name,
|
|||
|
||||
if (bind(sbind, (const struct sockaddr *)&salg, sizeof(salg)) != 0) {
|
||||
error_setg_errno(errp, errno, "Failed to bind socket");
|
||||
closesocket(sbind);
|
||||
close(sbind);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -105,11 +105,11 @@ void qcrypto_afalg_comm_free(QCryptoAFAlg *afalg)
|
|||
}
|
||||
|
||||
if (afalg->tfmfd != -1) {
|
||||
closesocket(afalg->tfmfd);
|
||||
close(afalg->tfmfd);
|
||||
}
|
||||
|
||||
if (afalg->opfd != -1) {
|
||||
closesocket(afalg->opfd);
|
||||
close(afalg->opfd);
|
||||
}
|
||||
|
||||
g_free(afalg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue