This should save us having to worry about different OSs' defining it in
different headers.
git-svn-id: svn://svn.tartarus.org/sgt/putty@3126
cda61777-01e9-0310-a592-
d414129be87e
int err;
Actual_Socket ret;
short localport;
int err;
Actual_Socket ret;
short localport;
/*
* Create Socket structure.
/*
* Create Socket structure.
a.sin_addr.s_addr = htonl(addr->address);
a.sin_port = htons((short) port);
#endif
a.sin_addr.s_addr = htonl(addr->address);
a.sin_port = htons((short) port);
#endif
- {
- int i = 1;
- ioctl(s, FIONBIO, &i);
- }
+
+ fl = fcntl(s, F_GETFL);
+ if (fl != -1)
+ fcntl(s, F_SETFL, fl | O_NONBLOCK);