SLIRP: Use the correct function to close a socket on Windows
close() is not the same as closesocket()...
This commit is contained in:
@@ -598,7 +598,11 @@ solisten(port, laddr, lport, flags)
|
|||||||
(listen(s,1) < 0)) {
|
(listen(s,1) < 0)) {
|
||||||
int tmperrno = errno; /* Don't clobber the real reason we failed */
|
int tmperrno = errno; /* Don't clobber the real reason we failed */
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
closesocket(s);
|
||||||
|
#else
|
||||||
close(s);
|
close(s);
|
||||||
|
#endif
|
||||||
sofree(so);
|
sofree(so);
|
||||||
/* Restore the real errno */
|
/* Restore the real errno */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|||||||
Reference in New Issue
Block a user