Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2012 12:02:01 GMT
From:      Jukka Ukkonen <jau@iki.fi>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/172689: Problem building hercules + patch
Message-ID:  <201210141202.q9EC21ra033783@red.freebsd.org>
Resent-Message-ID: <201210141210.q9ECA122078917@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172689
>Category:       ports
>Synopsis:       Problem building hercules + patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 14 12:10:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jukka Ukkonen
>Release:        9.1-PRERELEASE
>Organization:
-----
>Environment:
FreeBSD sleipnir 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Sat Oct 13 10:39:00 EEST 2012     root@sleipnir:/usr/obj/usr/src/sys/Sleipnir  amd64

>Description:
There was a problem with hercules. The build failed due to
faulty setsockopt() parameters to set TCP keepalive values.
Find a patch attached.

Bjoern Zeeb has already seen the patch and advised me to
mention "Approved by maintainer."

>How-To-Repeat:
Try building hercules without the patch.
>Fix:
Add the attached patch files as hercules/files/patch-hscutl.c and ...
make clean
make


Patch attached with submission follows:

--- hscutl.c.orig	2012-10-14 08:47:02.252508688 +0300
+++ hscutl.c	2012-10-14 08:48:03.485519701 +0300
@@ -704,7 +704,7 @@
     if (rc) logmsg("HHCUT002I TCP_KEEPALIVE rc=%d %s\n", rc, strerror(errno));
   #elif defined(TCP_KEEPIDLE)
     optval = idle_time;
-    rc = setsockopt(sfd, SOL_TCP, TCP_KEEPIDLE, &optval, sizeof(optval)); 
+    rc = setsockopt(sfd, IPPROTO_TCP, TCP_KEEPIDLE, &optval, sizeof(optval)); 
     if (rc) logmsg("HHCUT003I TCP_KEEPIDLE rc=%d %s\n", rc, strerror(errno));
   #else
     UNREFERENCED(idle_time);
@@ -712,7 +712,7 @@
 
   #if defined(TCP_KEEPINTVL)
     optval = probe_interval;
-    rc = setsockopt(sfd, SOL_TCP, TCP_KEEPINTVL, &optval, sizeof(optval)); 
+    rc = setsockopt(sfd, IPPROTO_TCP, TCP_KEEPINTVL, &optval, sizeof(optval)); 
     if (rc) logmsg("HHCUT004I TCP_KEEPINTVL rc=%d %s\n", rc, strerror(errno));
   #else
     UNREFERENCED(probe_interval);
@@ -720,7 +720,7 @@
 
   #if defined(TCP_KEEPCNT)
     optval = probe_count;
-    rc = setsockopt(sfd, SOL_TCP, TCP_KEEPCNT, &optval, sizeof(optval)); 
+    rc = setsockopt(sfd, IPPROTO_TCP, TCP_KEEPCNT, &optval, sizeof(optval)); 
     if (rc) logmsg("HHCUT005I TCP_KEEPCNT rc=%d %s\n", rc, strerror(errno));
   #else
     UNREFERENCED(probe_count);


>Release-Note:
>Audit-Trail:
>Unformatted:



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