libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 6d1993c5c1f52e259d5f5dacde5e321a3b1a19f2
parent e33528862ac09ae22d06baaf1d3b92d973dd2b22
Author: ng0 <ng0@n0.is>
Date:   Mon, 22 Jul 2019 15:29:56 +0000

connection.c: preprocessor ifdef some setsockopts.

Diffstat:
Msrc/microhttpd/connection.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -501,6 +501,7 @@ _MHD_static_inline bool socket_start_extra_buffering (struct MHD_Connection *connection) { mhd_assert(NULL != connection); +#if OLD_SOCKOPT #if defined(TCP_NODELAY) if (connection->sk_tcp_nodelay_on) { @@ -517,7 +518,9 @@ socket_start_extra_buffering (struct MHD_Connection *connection) } } #endif /* TCP_NODELAY */ +#endif /* OLD_SOCKOPT */ +#if OLD_SOCKOPT #if defined(MHD_TCP_CORK_NOPUSH) if (!connection->sk_tcp_cork_nopush_on) { @@ -534,12 +537,15 @@ socket_start_extra_buffering (struct MHD_Connection *connection) } } #endif /* MHD_TCP_CORK_NOPUSH */ +#endif /* OLD_SOCKOPT */ +#if OLD_SOCKOPT #if defined(TCP_NODELAY) return connection->sk_tcp_cork_nopush_on && !connection->sk_tcp_nodelay_on; #else /* ! TCP_NODELAY */ return connection->sk_tcp_cork_nopush_on; #endif /* ! TCP_NODELAY */ +#endif /* OLD_SOCKOPT */ }