summaryrefslogtreecommitdiff
path: root/lib/server/TcpNice.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2016-09-03 00:07:23 +0100
committerChris Wilson <chris+github@qwirx.com>2016-09-03 00:07:23 +0100
commitc0125ee22e09a31ae291e42faa817835bd903dbc (patch)
treeaca37c831ef9897f1b4898cbf8d2bef36112c5af /lib/server/TcpNice.cpp
parent0560d351665313fcdd503af213118eec46930cbe (diff)
Update platform feature detection to work with CMake.
Rewrite some macros in forms that can be parsed by our parser written in CMake language (fake m4 with regexps). Fix incorrect conditional includes and incorrect #if/#ifdef assumptions.
Diffstat (limited to 'lib/server/TcpNice.cpp')
-rw-r--r--lib/server/TcpNice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/server/TcpNice.cpp b/lib/server/TcpNice.cpp
index 40e7a6b5..79e91eeb 100644
--- a/lib/server/TcpNice.cpp
+++ b/lib/server/TcpNice.cpp
@@ -146,7 +146,7 @@ void NiceSocketStream::Write(const void *pBuffer, int NBytes)
int socket = mapSocket->GetSocketHandle();
int rtt = 50; // WAG
-# if HAVE_DECL_SOL_TCP && HAVE_DECL_TCP_INFO && HAVE_STRUCT_TCP_INFO_TCPI_RTT
+# if HAVE_DECL_SOL_TCP && defined HAVE_STRUCT_TCP_INFO_TCPI_RTT
struct tcp_info info;
socklen_t optlen = sizeof(info);
if(getsockopt(socket, SOL_TCP, TCP_INFO, &info, &optlen) == -1)
@@ -164,7 +164,7 @@ void NiceSocketStream::Write(const void *pBuffer, int NBytes)
{
rtt = info.tcpi_rtt;
}
-# endif
+# endif // HAVE_DECL_SOL_TCP && defined HAVE_STRUCT_TCP_INFO_TCPI_RTT
int newWindow = mTcpNice.GetNextWindowSize(mBytesWrittenThisPeriod,
elapsed, rtt);