diff -u -r ./libmicrohttpd-0.4.0a-orig/configure.ac ./libmicrohttpd-0.4.0a/configure.ac --- ./libmicrohttpd-0.4.0a-orig/configure.ac 2009-02-20 09:35:33.000000000 -0800 +++ ./libmicrohttpd-0.4.0a/configure.ac 2009-03-02 12:05:24.000000000 -0800 @@ -173,7 +173,7 @@ AC_MSG_RESULT($have_inet6) # TCP_CORK -AC_CHECK_DECL([TCP_CORK], [], [], [[#include ]]) +AC_CHECK_DECLS([TCP_CORK], [], [], [[#include ]]) # libcurl (required for testing) SAVE_LIBS=$LIBS diff -u -r ./libmicrohttpd-0.4.0a-orig/src/daemon/connection.c ./libmicrohttpd-0.4.0a/src/daemon/connection.c --- ./libmicrohttpd-0.4.0a-orig/src/daemon/connection.c 2009-02-16 20:11:59.000000000 -0800 +++ ./libmicrohttpd-0.4.0a/src/daemon/connection.c 2009-03-02 12:07:49.000000000 -0800 @@ -31,6 +31,11 @@ #include "response.h" #include "reason_phrase.h" +#if HAVE_NETINET_TCP_H +/* for TCP_CORK */ +#include +#endif + /** * Message to transmit when http 1.1 request is received */ @@ -1961,7 +1966,7 @@ } 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 @@ /* 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;