aboutsummaryrefslogtreecommitdiff
path: root/crypto
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 /crypto
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 'crypto')
-rw-r--r--crypto/afalg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/afalg.c b/crypto/afalg.c
index 10046bb0ae..348301e703 100644
--- a/crypto/afalg.c
+++ b/crypto/afalg.c
@@ -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);