diff options
author | Peter Powell <petpow@saberuk.com> | 2013-07-07 14:27:54 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-07-16 21:48:53 +0100 |
commit | 22f013a06f6015ab7601329a632001770cd14941 (patch) | |
tree | beafd72407d56185b39b6a90dc1d63a4eafa052c /src | |
parent | 6033f1d6fa3d37e068a56c29ef47b220abb3174d (diff) |
Use the preprocessor to check for TCP deferring support.
Diffstat (limited to 'src')
-rw-r--r-- | src/listensocket.cpp | 7 |
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"); |