From owner-freebsd-ports@FreeBSD.ORG Mon Aug 30 06:04:09 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E0310656B7 for ; Mon, 30 Aug 2010 06:04:09 +0000 (UTC) (envelope-from c-s@c-s.li) Received: from server22.cyon.ch (server22.cyon.ch [194.126.200.32]) by mx1.freebsd.org (Postfix) with ESMTP id AB8FC8FC12 for ; Mon, 30 Aug 2010 06:04:09 +0000 (UTC) Received: from [84.72.44.78] (helo=[192.168.1.11]) by server22.cyon.ch with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Opx7S-0005CU-Bb for freebsd-ports@freebsd.org; Mon, 30 Aug 2010 07:41:22 +0200 From: C-S To: freebsd-ports@freebsd.org Content-Type: text/plain; charset="UTF-8" Date: Mon, 30 Aug 2010 07:41:20 +0200 Message-ID: <1283146880.1493.6.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server22.cyon.ch X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - c-s.li Subject: Howto: TCP_KEEPIDLE ----> TCPTV_KEEP_IDLE ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 06:04:10 -0000 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...