From: Ruben Kerkhof Date: Sat, 14 Feb 2015 14:42:07 +0000 (+0100) Subject: Older kernels don't have SO_REUSEPORT X-Git-Tag: dnsdist-1.0.0-alpha1~302^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c648bdce245df521831e7451274dd8996b600ecc;p=pdns Older kernels don't have SO_REUSEPORT --- diff --git a/pdns/dumresp.cc b/pdns/dumresp.cc index 135a94b5c..8739715a0 100644 --- a/pdns/dumresp.cc +++ b/pdns/dumresp.cc @@ -19,9 +19,11 @@ try Socket s(AF_INET, SOCK_DGRAM); ComboAddress local(argv[1], 5300); +#ifdef SO_REUSEPORT int one=1; if(setsockopt(s.getHandle(), SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) < 0) unixDie("setsockopt for REUSEPORT"); +#endif s.bind(local); char buffer[1500];