529@@ -530,7 +530,7 @@ bool AppInit2(boost::thread_group& threadGroup)
530 // Make sure enough file descriptors are available
531 int nBind = std::max((int)mapArgs.count("-bind"), 1);
532 nMaxConnections = GetArg("-maxconnections", 125);
533- nMaxConnections = std::max(std::min(nMaxConnections, FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS), 0);
534+ nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
This looks like it will create problems if nBind+MIN_CORE_FILEDESCRIPTORS are > FD_SETSIZE…
Not that I see any reason someone should bind more than 1024 ports…