mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Patch from Frediano Ziglio: Windows compilation fixes on eventdns.c.
svn:r6971
This commit is contained in:
parent
e64825126b
commit
19cf66c0f1
@ -1186,8 +1186,8 @@ eventdns_nameserver_add(unsigned long int address) {
|
||||
if (ns->socket < 0) { err = 1; goto out1; }
|
||||
#ifdef MS_WINDOWS
|
||||
{
|
||||
int nonblocking = 1;
|
||||
ioctlsocket(socket, FIONBIO, (unsigned long*) &nonblocking);
|
||||
u_long nonblocking = 1;
|
||||
ioctlsocket(ns->socket, FIONBIO, &nonblocking);
|
||||
}
|
||||
#else
|
||||
fcntl(ns->socket, F_SETFL, O_NONBLOCK);
|
||||
@ -1223,7 +1223,11 @@ eventdns_nameserver_add(unsigned long int address) {
|
||||
return 0;
|
||||
|
||||
out2:
|
||||
#ifdef MS_WINDOWS
|
||||
closesocket(ns->socket);
|
||||
#else
|
||||
close(ns->socket);
|
||||
#endif
|
||||
out1:
|
||||
free(ns);
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user