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

Server/http.c
Server/server.c

index 5b7fc8d37b7163a4499209ebc16681e3aaadae9e..a80745991bd11b16c0270d14fcaf15d35502de93 100644 (file)
@@ -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);
index dd973204ea8151fa7a046c66a8b0f69909dc87bb..3ceef41d6707a7244f6adb0fb25c65e80ddbad57 100644 (file)
@@ -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);