mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08: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
|
@ -117,13 +117,13 @@ static int socket_can_bind_connect(const char *hostname, int family)
|
|||
|
||||
cleanup:
|
||||
if (afd != -1) {
|
||||
closesocket(afd);
|
||||
close(afd);
|
||||
}
|
||||
if (cfd != -1) {
|
||||
closesocket(cfd);
|
||||
close(cfd);
|
||||
}
|
||||
if (lfd != -1) {
|
||||
closesocket(lfd);
|
||||
close(lfd);
|
||||
}
|
||||
if (res) {
|
||||
freeaddrinfo(res);
|
||||
|
@ -160,7 +160,7 @@ void socket_check_afunix_support(bool *has_afunix)
|
|||
int fd;
|
||||
|
||||
fd = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||
closesocket(fd);
|
||||
close(fd);
|
||||
|
||||
#ifdef _WIN32
|
||||
*has_afunix = (fd != (int)INVALID_SOCKET);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue