NetBSD Problem Report #45039

From www@NetBSD.org  Fri Jun 10 12:26:23 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 018C763B99B
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 10 Jun 2011 12:26:23 +0000 (UTC)
Message-Id: <20110610122622.1D16C63B970@www.NetBSD.org>
Date: Fri, 10 Jun 2011 12:26:22 +0000 (UTC)
From: tcort@minix3.org
Reply-To: tcort@minix3.org
To: gnats-bugs@NetBSD.org
Subject: net/libfetch minix support
X-Send-Pr-Version: www-1.0

>Number:         45039
>Category:       pkg
>Synopsis:       net/libfetch minix support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    joerg
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 10 12:30:00 +0000 2011
>Closed-Date:    Sun Nov 06 20:25:54 +0000 2011
>Last-Modified:  Sun Nov 06 20:25:54 +0000 2011
>Originator:     Thomas Cort
>Release:        N/A
>Organization:
Minix3
>Environment:
Minix 192.168.122.210 3.2.0 i686
>Description:
The software doesn't compile out of the box on the Minix operating system. The networking stack on Minix is more limited than most and doesn't define ECONNABORTED, ENETRESET, nor EHOSTDOWN. Additionally, HAVE_SA_LEN shouldn't be set for minix.
>How-To-Repeat:
Attempt to build libfetch on Minix.
>Fix:
diff --git a/net/libfetch/files/common.c b/net/libfetch/files/common.c
index ce88821..1d39484 100644
--- a/net/libfetch/files/common.c
+++ b/net/libfetch/files/common.c
@@ -150,11 +150,15 @@ fetch_syserr(void)
 	case EADDRNOTAVAIL:
 	case ENETDOWN:
 	case ENETUNREACH:
+#if defined(ENETRESET)
 	case ENETRESET:
+#endif
 	case EHOSTUNREACH:
 		fetchLastErrCode = FETCH_NETWORK;
 		break;
+#if defined(ECONNABORTED)
 	case ECONNABORTED:
+#endif
 	case ECONNRESET:
 		fetchLastErrCode = FETCH_ABORT;
 		break;
@@ -162,7 +166,9 @@ fetch_syserr(void)
 		fetchLastErrCode = FETCH_TIMEOUT;
 		break;
 	case ECONNREFUSED:
+#if defined(EHOSTDOWN)
 	case EHOSTDOWN:
+#endif
 		fetchLastErrCode = FETCH_DOWN;
 		break;
 default:
diff --git a/net/libfetch/files/common.h b/net/libfetch/files/common.h
index 78c6bde..997adce 100644
--- a/net/libfetch/files/common.h
+++ b/net/libfetch/files/common.h
@@ -47,7 +47,7 @@

 #if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \
     !defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \
-    !defined(__sgi)
+    !defined(__sgi) && !defined(__minix)
 #define HAVE_SA_LEN
 #endif


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Fri, 10 Jun 2011 12:31:39 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Thomas Cort <tcort@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45039: net/libfetch minix support
Date: Sat, 5 Nov 2011 15:45:05 -0400

 The original patch sent with this problem report is now obsolete due to changes
 in Minix's C libary. Below is an updated patch to port net/libfetch to Minix.


 Patch Summary:

  * Minix doesn't have have support for sa_len, so don't define HAVE_SA_LEN
 when __minix is defined.



 Index: files/common.h
 ===================================================================
 RCS file: /cvsroot/pkgsrc/net/libfetch/files/common.h,v
 retrieving revision 1.16
 diff -u -p -r1.16 common.h
 --- files/common.h	21 Mar 2010 16:48:43 -0000	1.16
 +++ files/common.h	5 Nov 2011 19:29:16 -0000
 @@ -47,7 +47,7 @@

  #if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \
      !defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \
 -    !defined(__sgi)
 +    !defined(__sgi) && !defined(__minix)
  #define HAVE_SA_LEN
  #endif


From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45039: net/libfetch minix support
Date: Sun, 6 Nov 2011 20:02:51 +0100

 On Sat, Nov 05, 2011 at 07:50:07PM +0000, Thomas Cort wrote:
 >   * Minix doesn't have have support for sa_len, so don't define HAVE_SA_LEN
 >  when __minix is defined.
 >  
 >  
 >  
 >  Index: files/common.h
 >  ===================================================================
 >  RCS file: /cvsroot/pkgsrc/net/libfetch/files/common.h,v
 >  retrieving revision 1.16
 >  diff -u -p -r1.16 common.h
 >  --- files/common.h	21 Mar 2010 16:48:43 -0000	1.16
 >  +++ files/common.h	5 Nov 2011 19:29:16 -0000
 >  @@ -47,7 +47,7 @@
 >   
 >   #if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \
 >       !defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \
 >  -    !defined(__sgi)
 >  +    !defined(__sgi) && !defined(__minix)
 >   #define HAVE_SA_LEN
 >   #endif

 Please commit.

 Joerg

From: Thomas Cort <tcort@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45039: net/libfetch minix support
Date: Sun, 6 Nov 2011 15:23:30 -0500

 Module Name:    pkgsrc
 Committed By:   tcort
 Date:           Sun Nov  6 20:03:50 UTC 2011

 Modified Files:
         pkgsrc/net/libfetch/files: common.h

 Log Message:
 Do not define HAVE_SA_LEN when __minix is defined per pkg/45039


 To generate a diff of this commit:
 cvs rdiff -u -r1.16 -r1.17 pkgsrc/net/libfetch/files/common.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: tcort@NetBSD.org
State-Changed-When: Sun, 06 Nov 2011 20:25:54 +0000
State-Changed-Why:
Changes comitted.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.