mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Fix non-blocking socket creation on Linux
This commit is contained in:
parent
baab65b6b3
commit
5f6c9f599d
@ -525,12 +525,11 @@ static reliable_socket reliable_sockets[MAXRELIABLESOCKETS];
|
||||
|
||||
int make_nonblocking(SOCKET sock)
|
||||
{
|
||||
SOCKET rval;
|
||||
#ifdef WIN32
|
||||
unsigned long arg = 1;
|
||||
return ioctlsocket(sock, FIONBIO, &arg);
|
||||
#else // WIN32
|
||||
return fcntl(sock, F_SETFL, fcntl(rval, F_GETFL, 0) | O_NONBLOCK);
|
||||
return fcntl(sock, F_SETFL, fcntl(sock, F_GETFL, 0) | O_NONBLOCK);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user