Index: krdc/vnc/vncclientthread.cpp
===================================================================
--- krdc.orig/vnc/vncclientthread.cpp	2014-08-26 23:05:50.606094524 +0200
+++ krdc/vnc/vncclientthread.cpp	2014-08-26 23:13:29.107290324 +0200
@@ -26,6 +26,7 @@
 #include <cerrno>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
+#include <sys/param.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <QMutexLocker>
@@ -606,6 +607,7 @@
         return;
     }
 
+#if !defined(__FreeBSD__) || __FreeBSD__ >= 10
     optval = m_keepalive.intervalSeconds;
     if (setsockopt(cl->sock, IPPROTO_TCP, TCP_KEEPIDLE, &optval, optlen) < 0) {
         kError(5011) << "setsockopt(TCP_KEEPIDLE)" << strerror(errno);
@@ -623,6 +625,7 @@
         kError(5011) << "setsockopt(TCP_KEEPCNT)" << strerror(errno);
         return;
     }
+#endif
     m_keepalive.set = true;
     kDebug(5011) << "TCP keepalive set";
 }
