]> granicus.if.org Git - pdns/commitdiff
Older kernels don't have SO_REUSEPORT
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 14 Feb 2015 14:42:07 +0000 (15:42 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 14 Feb 2015 14:42:07 +0000 (15:42 +0100)
pdns/dumresp.cc

index 135a94b5c64288bb55f6d5f3bef85b39801185ae..8739715a0511464d87f6f8ac2836b041bee54584 100644 (file)
@@ -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];