From 1654ece3b2821ed599530ae03694af50d0547f50 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 5 Oct 2016 10:38:04 +0200 Subject: [PATCH] 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. --- pdns/dnsdist.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.50.0