From 79b158cd1e956f3b5938407e5a8fdcc808071463 Mon Sep 17 00:00:00 2001 From: Nishi Date: Thu, 19 Sep 2024 12:59:40 +0000 Subject: [PATCH] fix select git-svn-id: file:///raid/svn-personal/tewi/trunk@88 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Server/http.c | 4 ++++ Server/server.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Server/http.c b/Server/http.c index 5b7fc8d..a807459 100644 --- a/Server/http.c +++ b/Server/http.c @@ -71,7 +71,11 @@ int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req) { #ifndef NO_SSL if(ssl == NULL || !SSL_has_pending(ssl)) { #endif +#ifdef __HAIKU__ + int n = select(32, &fds, NULL, NULL, &tv); +#else int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv); +#endif if(n <= 0) { cm_log("HTTP", "Timeout, disconncting"); free(header); diff --git a/Server/server.c b/Server/server.c index dd97320..3ceef41 100644 --- a/Server/server.c +++ b/Server/server.c @@ -79,7 +79,7 @@ int tw_wildcard_match(const char* wildcard, const char* target) { } void close_socket(int sock) { -#if defined(__MINGW32__) || defined(__HAIKU__) +#if defined(__MINGW32__) closesocket(sock); #else close(sock); -- 2.43.0