mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 06:27:41 -07: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
|
|
@ -99,7 +99,7 @@ static int inet_get_free_port_multiple(int nb, int *port, bool ipv6)
|
|||
|
||||
nb = i;
|
||||
for (i = 0; i < nb; i++) {
|
||||
closesocket(sock[i]);
|
||||
close(sock[i]);
|
||||
}
|
||||
|
||||
return nb;
|
||||
|
|
@ -361,8 +361,8 @@ static void test_stream_fd(void)
|
|||
qtest_quit(qts1);
|
||||
qtest_quit(qts0);
|
||||
|
||||
closesocket(sock[0]);
|
||||
closesocket(sock[1]);
|
||||
close(sock[0]);
|
||||
close(sock[1]);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -487,8 +487,8 @@ static void test_dgram_fd(void)
|
|||
qtest_quit(qts1);
|
||||
qtest_quit(qts0);
|
||||
|
||||
closesocket(sv[0]);
|
||||
closesocket(sv[1]);
|
||||
close(sv[0]);
|
||||
close(sv[1]);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue