From: Dan Fandrich Date: Fri, 28 Nov 2008 22:07:40 +0000 (+0000) Subject: Only set TCP_NODELAY when it exists X-Git-Tag: curl-7_19_3~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00142d8443325a0ea48befc6c0347a065a67f1e0;p=thirdparty%2Fcurl.git Only set TCP_NODELAY when it exists --- diff --git a/ares/ares_process.c b/ares/ares_process.c index 05341aa64f..58f072595b 100644 --- a/ares/ares_process.c +++ b/ares/ares_process.c @@ -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));