]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix compilation on FreeBSD. reported by HellSpawn 12346/head
authorOtto Moerbeek <otto@drijf.net>
Mon, 12 Dec 2022 19:03:04 +0000 (20:03 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 20 Dec 2022 08:46:03 +0000 (09:46 +0100)
(cherry picked from commit 398bb0f1e7122d6de0e6c5ec3383ba49a446d580)

pdns/pdns_recursor.cc
pdns/recursordist/rec-tcp.cc

index ee826d784da70d37efe5adc2a3f7d1aac880fba5..1b62d2db9b3df5b6fecec0340de21342780f2996 100644 (file)
@@ -2517,7 +2517,7 @@ void makeUDPServerSockets(deferredAdd_t& deferredAdds, Logr::log_t log)
     if (g_reusePort) {
 #if defined(SO_REUSEPORT_LB)
       try {
-        SSetsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB, 1);
+        SSetsockopt(socketFd, SOL_SOCKET, SO_REUSEPORT_LB, 1);
       }
       catch (const std::exception& e) {
         throw PDNSException(std::string("SO_REUSEPORT_LB: ") + e.what());
index e1bc143b6e3d76dc2c70196e82e687e1d3a0e9ce..160fe9857228795797327f3c76ea6eae6cef4bfb 100644 (file)
@@ -1067,7 +1067,7 @@ void makeTCPServerSockets(deferredAdd_t& deferredAdds, std::set<int>& tcpSockets
     if (g_reusePort) {
 #if defined(SO_REUSEPORT_LB)
       try {
-        SSetsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB, 1);
+        SSetsockopt(socketFd, SOL_SOCKET, SO_REUSEPORT_LB, 1);
       }
       catch (const std::exception& e) {
         throw PDNSException(std::string("SO_REUSEPORT_LB: ") + e.what());