msg_Err( p_this, "cannot set socket to non-blocking mode" );
}
#else
- if( fd >= FD_SETSIZE )
- {
- /* We don't want to overflow select() fd_set */
- msg_Err( p_this, "cannot create socket (too many already in use)" );
- net_Close( fd );
- return -1;
- }
-
fcntl( fd, F_SETFD, FD_CLOEXEC );
i_val = fcntl( fd, F_GETFL, 0 );
fcntl( fd, F_SETFL, ((i_val != -1) ? i_val : 0) | O_NONBLOCK );
if( i_val < 0 )
msg_Err( p_this, "accept failed (%s)",
net_strerror( net_errno ) );
-#ifndef WIN32
- else if( i_val >= FD_SETSIZE )
- {
- net_Close( i_val ); /* avoid future overflows in FD_SET */
- msg_Err( p_this, "accept failed (too many sockets opened)" );
- }
-#endif
else
{
const int yes = 1;