accept_filter directive on Linux requires TCP_DEFER_ACCEPT which
in turn requires netinet/tcp.h. This was removed when splitting comm
into libcomm.la.
#include "SquidTime.h"
#include "StatCounters.h"
-namespace Comm
-{
-CBDATA_CLASS_INIT(TcpAcceptor);
-};
+#ifdef HAVE_NETINET_TCP_H
+// required for accept_filter to build.
+#include <netinet/tcp.h>
+#endif
+
+CBDATA_NAMESPACED_CLASS_INIT(Comm, TcpAcceptor);
Comm::TcpAcceptor::TcpAcceptor(const Comm::ConnectionPointer &newConn, const char *note, const Subscription::Pointer &aSub) :
AsyncJob("Comm::TcpAcceptor"),