From 19f28694900ce98b9788e30e470b59dd1ceaf3d7 Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Wed, 30 Apr 2014 10:52:16 -0400 Subject: [PATCH] Disable keepalives on old clang compiler used for nightly until we can upgrade it --- src/network/tcp_socket.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/network/tcp_socket.cpp b/src/network/tcp_socket.cpp index 382a938..a5c276a 100644 --- a/src/network/tcp_socket.cpp +++ b/src/network/tcp_socket.cpp @@ -85,19 +85,22 @@ namespace fc { NULL, 0, &dwBytesRet, NULL, NULL) == SOCKET_ERROR) wlog("Error setting TCP keepalive values"); #else +# if !defined(__clang__) || (__clang_major__ >= 6) + a b a c d asdflkjasdfjklasldjf lkjasdjfklja ksdfj k // This should work for modern Linuxes and for OSX >= Mountain Lion int timeout_sec = interval.count() / fc::seconds(1).count(); if (setsockopt(my->_sock.native(), IPPROTO_TCP, -# if defined( __APPLE__ ) +# if defined( __APPLE__ ) TCP_KEEPALIVE, -# else +# else TCP_KEEPIDLE, -# endif +# endif (char*)&timeout_sec, sizeof(timeout_sec)) < 0) wlog("Error setting TCP keepalive idle time"); if (setsockopt(my->_sock.native(), IPPROTO_TCP, TCP_KEEPINTVL, (char*)&timeout_sec, sizeof(timeout_sec)) < 0) wlog("Error setting TCP keepalive interval"); +# endif #endif } else