From: Remi Gacogne Date: Wed, 5 Oct 2016 08:38:04 +0000 (+0200) Subject: dnsdist: Use portable IPPROTO_TCP instead of SOL_TCP for TCP_FASTOPEN X-Git-Tag: dnsdist-1.1.0-beta2~73^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1654ece3b2821ed599530ae03694af50d0547f50;p=pdns dnsdist: Use portable IPPROTO_TCP instead of SOL_TCP for TCP_FASTOPEN This fixes the compilation on FreeBSD, where IPPROTO_TCP and TCP_FASTOPEN are defined but SOL_TCP isn't. --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 847cdcacf..16e95957d 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -1760,7 +1760,7 @@ try #endif if (std::get<3>(local) > 0) { #ifdef TCP_FASTOPEN - SSetsockopt(cs->tcpFD, SOL_TCP, TCP_FASTOPEN, std::get<3>(local)); + SSetsockopt(cs->tcpFD, IPPROTO_TCP, TCP_FASTOPEN, std::get<3>(local)); #else warnlog("TCP Fast Open has been configured on local address '%s' but is not supported", std::get<0>(local).toStringWithPort()); #endif @@ -1837,7 +1837,7 @@ try #endif if (std::get<3>(dcLocal) > 0) { #ifdef TCP_FASTOPEN - SSetsockopt(cs->tcpFD, SOL_TCP, TCP_FASTOPEN, std::get<3>(dcLocal)); + SSetsockopt(cs->tcpFD, IPPROTO_TCP, TCP_FASTOPEN, std::get<3>(dcLocal)); #else warnlog("TCP Fast Open has been configured on local address '%s' but is not supported", std::get<0>(dcLocal).toStringWithPort()); #endif