commit 0a883d3c6041a6d55c5de509ca448940bb07e14b
parent b4da5f6d751734cbf8bd6690aededed2c8857250
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 3 Mar 2009 00:13:22 +0000
fixing cork 1463
Diffstat:
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -173,7 +173,7 @@ have_inet6=no
AC_MSG_RESULT($have_inet6)
# TCP_CORK
-AC_CHECK_DECL([TCP_CORK], [], [], [[#include <netinet/tcp.h>]])
+AC_CHECK_DECLS([TCP_CORK], [], [], [[#include <netinet/tcp.h>]])
# libcurl (required for testing)
SAVE_LIBS=$LIBS
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
@@ -31,6 +31,11 @@
#include "response.h"
#include "reason_phrase.h"
+#if HAVE_NETINET_TCP_H
+/* for TCP_CORK */
+#include <netinet/tcp.h>
+#endif
+
/**
* Message to transmit when http 1.1 request is received
*/
@@ -1961,7 +1966,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
}
connection->state = MHD_CONNECTION_HEADERS_SENDING;
-#if HAVE_TCP_CORK
+#if HAVE_DECL_TCP_CORK
/* starting header send, set TCP cork */
{
const int val = 1;
@@ -2024,7 +2029,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
/* no default action */
break;
case MHD_CONNECTION_FOOTERS_SENT:
-#if HAVE_TCP_CORK
+#if HAVE_DECL_TCP_CORK
/* done sending, uncork */
{
const int val = 0;