Bin Meng e3fdb13e88 util/qemu-sockets: Replace the call to close a socket with closesocket()
close() is a *nix function. It works on any file descriptor, and
sockets in *nix are an example of a file descriptor.

closesocket() is a Windows-specific function, which works only
specifically with sockets. Sockets on Windows do not use *nix-style
file descriptors, and socket() returns a handle to a kernel object
instead, so it must be closed with closesocket().

In QEMU there is already a logic to handle such platform difference
in os-posix.h and os-win32.h, that:

  * closesocket maps to close on POSIX
  * closesocket maps to a wrapper that calls the real closesocket()
    on Windows

Replace the call to close a socket with closesocket() instead.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-08-05 16:18:15 +01:00
..
2022-07-18 20:24:36 +02:00
2022-04-21 17:03:51 +04:00
2022-04-20 10:51:11 -07:00
2022-07-13 16:58:57 +02:00
2022-07-13 16:58:57 +02:00
2022-07-18 20:24:36 +02:00
2022-06-29 10:56:12 +03:00
2022-04-28 08:51:56 +02:00