]> Git repositories of Nishi - tewi.git/commitdiff
fix select
authorNishi <nishi@nishi.boats>
Thu, 19 Sep 2024 12:54:03 +0000 (12:54 +0000)
committerNishi <nishi@nishi.boats>
Thu, 19 Sep 2024 12:54:03 +0000 (12:54 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@86 8739d7e6-ffea-ec47-b151-bdff447c6205

Server/server.c

index b801dd6ef5e408429dae824796b68f5319a9431e..0328977cdb4ac9a9ad295f1f80b78e50753a5d1c 100644 (file)
@@ -764,7 +764,11 @@ void tw_server_loop(void) {
                }
                tv.tv_sec = 1;
                tv.tv_usec = 0;
-               int ret = select(sockcount, &fdset, NULL, NULL, &tv);
+#ifdef __HAIKU__
+               int ret = select(32, &fdset, NULL, NULL, &tv);
+#else
+               int ret = select(FD_SETSIZE, &fdset, NULL, NULL, &tv);
+#endif
                if(ret == -1) {
 #ifndef __MINGW32__
                        cm_log("Server", "Select failure: %s", strerror(errno));