NetBSD Problem Report #18007
Received: (qmail 17799 invoked by uid 605); 21 Aug 2002 05:58:25 -0000
Message-Id: <200208211558.g7LFwqK21863@mofo.grunta.com>
Date: Thu, 22 Aug 2002 01:58:52 +1000 (EST)
From: grant@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: net/wget assumes IPv6 defines and functions are available
X-Send-Pr-Version: 3.95
>Number: 18007
>Category: pkg
>Synopsis: net/wget assumes IPv6 defines and functions are available
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: grant
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 21 05:59:01 +0000 2002
>Closed-Date: Sat Nov 30 18:06:02 +0000 2002
>Last-Modified: Sat Nov 30 18:06:02 +0000 2002
>Originator: grant beattie
>Release: -current pkgsrc
>Organization:
>Environment:
System: SunOS sphinx 5.7 Generic_106541-21 sun4u sparc SUNW,Ultra-60
Architecture: sparc
Machine: sun4u
>Description:
net/wget applies the KAME IPv6 patch without checking whether the host
is IPv6 enabled. The KAME patch uses defines and functions which are not
always present, and this causes the build to fail on Solaris 7:
gcc -I. -I. -I/opt/net/tmp/pkgbuild/net/wget/work.SunOS-5.7-sparc/.buildlink/include -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\"/usr/pkg/etc/wgetrc\" -DLOCALEDIR=\"/usr/pkg/lib/locale\" -I/opt/net/tmp/pkgbuild/net/wget/work.SunOS-5.7-sparc/.buildlink/include -O2 -c ftp-basic.c
ftp-basic.c: In function `ftp_eprt':
ftp-basic.c:408: `AF_INET6' undeclared (first use in this function)
ftp-basic.c:408: (Each undeclared identifier is reported only once
ftp-basic.c:408: for each function it appears in.)
Compiling without the KAME patch works, but patch-ad fails to apply.
>How-To-Repeat:
Attempt to build net/wget on a non-IPv6 capable host.
>Fix:
Only apply the KAME patch on IPv6 capable platforms (and fix patch-ad),
or create a new patch-af to fix what KAME messes up:
$NetBSD$
--- src/ftp-basic.c.orig Wed Aug 21 15:30:59 2002
+++ src/ftp-basic.c Wed Aug 21 15:46:01 2002
@@ -384,8 +384,7 @@
#ifndef INET6
if (((struct sockaddr *)&ss)->sa_family != AF_INET)
return HOSTERR;
- if (!inet_ntop(AF_INET, &((struct sockaddr_in *)&ss)->sin_addr, hbuf,
- sizeof(hbuf)))
+ if (!inet_ntoa((struct sockaddr_in *)&ss)->sin_addr)
return HOSTERR;
#else
if (getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf),
@@ -405,9 +404,11 @@
case AF_INET:
af = 1;
break;
+#ifdef INET6
case AF_INET6:
af = 2;
break;
+#endif
default:
af = 0; /*XXX*/
break;
@@ -461,8 +462,7 @@
#ifndef INET6
if (((struct sockaddr *)&ss)->sa_family != AF_INET)
return HOSTERR;
- if (!inet_ntop(AF_INET, &((struct sockaddr_in *)&ss)->sin_addr, hbuf,
- hlen))
+ if (!inet_ntoa((struct sockaddr_in *)&ss)->sin_addr)
return HOSTERR;
#else
if (getnameinfo((struct sockaddr *)&ss, sslen, hbuf, hlen, NULL, 0,
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->sol-pkg-manager
Responsible-Changed-By: wiz
Responsible-Changed-When: Sat Sep 28 16:42:32 PDT 2002
Responsible-Changed-Why:
Delegate to sol-pkg-manager.
State-Changed-From-To: open->closed
State-Changed-By: grant
State-Changed-When: Sat Nov 30 10:04:11 PST 2002
State-Changed-Why:
From pkgsrc-changes:
Module Name: pkgsrc
Committed By: grant
Date: Sat Nov 30 18:03:21 UTC 2002
Modified Files:
pkgsrc/net/wget: Makefile
Log Message:
only apply IPv6 patches if USE_INET6 is set.
Fixes build on (earlier) operating systems without IPv6 support.
To generate a diff of this commit:
cvs rdiff -r1.50 -r1.51 pkgsrc/net/wget/Makefile
Responsible-Changed-From-To: sol-pkg-manager->grant
Responsible-Changed-By: grant
Responsible-Changed-When: Sat Nov 30 10:04:11 PST 2002
Responsible-Changed-Why:
grant fixed in net/wget Makefile rev. 1.51.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.