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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4533%2Fhead;p=thirdparty%2Fpdns.git 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 847cdcacf3..16e95957d2 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