]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/nameserver.hh
Merge pull request #14324 from Habbie/auth-lua-docs-backquote-nit
[thirdparty/pdns.git] / pdns / nameserver.hh
index d592345ade023ba9b236b762d985c638c2b77cf9..4ad9b177a9d93a8067857c4a663aa1521f9d8abe 100644 (file)
@@ -19,9 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef NAMESERVER_HH
-#define NAMESERVER_HH
-
+#pragma once
 #include <poll.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -84,25 +82,15 @@ public:
   bool receive(DNSPacket& packet, std::string& buffer); //!< call this in a while or for(;;) loop to get packets
   void send(DNSPacket&); //!< send a DNSPacket. Will call DNSPacket::truncate() if over 512 bytes
   inline bool canReusePort() {
-#ifdef SO_REUSEPORT
     return d_can_reuseport;
-#else
-    return false;
-#endif
   };
   
 private:
   bool d_additional_socket;
-#ifdef SO_REUSEPORT
-  bool d_can_reuseport;
-#endif
+  bool d_can_reuseport{false};
   vector<int> d_sockets;
   void bindAddresses();
   vector<pollfd> d_rfds;
 };
 
 bool AddressIsUs(const ComboAddress& remote);
-
-extern ResponseStats g_rs;
-
-#endif