summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/listensocket.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp
index 20cbe51ac..9b69b53ff 100644
--- a/src/listensocket.cpp
+++ b/src/listensocket.cpp
@@ -21,10 +21,7 @@
#include "inspircd.h"
#include "socket.h"
#include "socketengine.h"
-
-#ifdef USE_TCP_DEFER_ACCEPT
#include <netinet/tcp.h>
-#endif
ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_to)
: bind_tag(tag)
@@ -63,9 +60,9 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t
int timeout = tag->getInt("defer", 0);
if (timeout && !rv)
{
-#ifdef USE_TCP_DEFER_ACCEPT
+#if defined TCP_DEFER_ACCEPT
setsockopt(fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, &timeout, sizeof(timeout));
-#elif defined USE_SO_ACCEPTFILTER
+#elif defined SO_ACCEPTFILTER
struct accept_filter_arg afa;
memset(&afa, 0, sizeof(afa));
strcpy(afa.af_name, "dataready");