SLIRP: Use the correct function to close a socket on Windows

close() is not the same as closesocket()...
This commit is contained in:
darkstar
2018-03-25 00:12:40 +01:00
parent e6f105724a
commit 54840155c8

View File

@@ -598,7 +598,11 @@ solisten(port, laddr, lport, flags)
(listen(s,1) < 0)) {
int tmperrno = errno; /* Don't clobber the real reason we failed */
close(s);
#ifdef _WIN32
closesocket(s);
#else
close(s);
#endif
sofree(so);
/* Restore the real errno */
#ifdef _WIN32