Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2010 07:41:20 +0200
From:      C-S <c-s@c-s.li>
To:        freebsd-ports@freebsd.org
Subject:   Howto: TCP_KEEPIDLE  ---->  TCPTV_KEEP_IDLE ?
Message-ID:  <1283146880.1493.6.camel@laptop>

next in thread | raw e-mail | index | archive | help
I am trying to update the devel/clanlib port to the latest version when
running into this problem.

The patch for unix_socket.cpp looks like this:

==================================================
if (enable && timeout != 0 && interval != 0)
        {
-               setsockopt(handle, SOL_TCP, TCP_KEEPIDLE, (const char *) &timeout, sizeof(int));
-               setsockopt(handle, SOL_TCP, TCP_KEEPINTVL, (const char *) &interval, sizeof(int));
+               setsockopt(handle, IPPROTO_TCP, TCPTV_KEEP_IDLE, (const char *) &timeout, sizeof(int));
+               setsockopt(handle, IPPROTO_TCP, TCPTV_KEEPINTVL, (const char *) &interval, sizeof(int));
        }
 }
==================================================

However, when compiling I get the following error:

==================================================
Socket/unix_socket.cpp:146: error: 'hz' was not declared in this scope
==================================================

It seems to be that TCP_KEEPIDLE and TCPTV_KEEP_IDLE use different measures.
Does anybody have an idea how to handle that problem?

Many thanks...




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1283146880.1493.6.camel>