diff options
author | Bin Meng <bin.meng@windriver.com> | 2022-08-02 15:51:57 +0800 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2022-08-05 16:18:15 +0100 |
commit | e3fdb13e8851be570db41a50589ce82d11d61c12 (patch) | |
tree | 1b237046dd6aafbdadcccfac68e5f67abcb768d6 /pc-bios/edk2-arm-vars.fd.bz2 | |
parent | 977c33ba5de58c9c5c857979516cb896db2c0969 (diff) | |
download | qemu-e3fdb13e8851be570db41a50589ce82d11d61c12.zip qemu-e3fdb13e8851be570db41a50589ce82d11d61c12.tar.gz qemu-e3fdb13e8851be570db41a50589ce82d11d61c12.tar.bz2 |
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>
Diffstat (limited to 'pc-bios/edk2-arm-vars.fd.bz2')
0 files changed, 0 insertions, 0 deletions