]> granicus.if.org Git - curl/commitdiff
Only set TCP_NODELAY when it exists
authorDan Fandrich <dan@coneharvesters.com>
Fri, 28 Nov 2008 22:07:40 +0000 (22:07 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 28 Nov 2008 22:07:40 +0000 (22:07 +0000)
ares/ares_process.c

index 05341aa64f6ddcf7b7d814eb2b0622e2fcfe0acb..58f072595b6d1a62c3075b058adfada94e66c18a 100644 (file)
@@ -897,6 +897,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
        return -1;
     }
 
+#ifdef TCP_NODELAY
   /*
    * Disable the Nagle algorithm (only relevant for TCP sockets, and thus not in
    * configure_socket). In general, in DNS lookups we're pretty much interested
@@ -910,6 +911,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
        closesocket(s);
        return -1;
     }
+#endif
 
   /* Connect to the server. */
   memset(&sockin, 0, sizeof(sockin));