From martti@research.zopps.fi Thu Jun 17 01:22:50 1999
Return-Path: <martti@research.zopps.fi>
Received: from server.research.zopps.fi (ws99.research.zopps.fi [195.165.196.99])
	by hub.freebsd.org (Postfix) with ESMTP id AD92A14C38
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 17 Jun 1999 01:22:45 -0700 (PDT)
	(envelope-from martti@research.zopps.fi)
Received: (from uucp@localhost)
	by server.research.zopps.fi (8.9.3/8.8.8) id LAA70474
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 17 Jun 1999 11:21:29 +0300 (EEST)
	(envelope-from martti.kuparinen)
Received: from ws125.research.zopps.fi(195.165.196.125)
 via SMTP by ws99.research.zopps.fi, id smtpdI70467; Thu Jun 17 11:21:21 1999
Received: (from martti@localhost)
	by ws125.research.zopps.fi (8.9.3/8.8.8) id LAA89404;
	Thu, 17 Jun 1999 11:21:20 +0300 (EEST)
	(envelope-from martti@research.zopps.fi)
Message-Id: <199906170821.LAA89404@ws125.research.zopps.fi>
Date: Thu, 17 Jun 1999 11:21:20 +0300 (EEST)
From: martti.kuparinen@research.zopps.fi
Sender: martti@research.zopps.fi
Reply-To: martti.kuparinen@research.zopps.fi
To: FreeBSD-gnats-submit@freebsd.org
Subject: BIND 8.1.2 compilation error in IPv6 capable host
X-Send-Pr-Version: 3.2

>Number:         12255
>Category:       bin
>Synopsis:       BIND 8.1.2 compilation error in IPv6 capable host
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 17 01:30:00 PDT 1999
>Closed-Date:    Tue Aug 15 05:05:18 PDT 2000
>Last-Modified:  Tue Aug 15 05:08:18 PDT 2000
>Originator:     Martti Kuparinen
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
>Environment:

	

>Description:

When running "make world" in FreeBSD 3.2 which has been powered
with the KAME IPv6 stuff, compilation of usr.bin/host fails:

===> usr.bin/host
cc -nostdinc -O -pipe -I/usr/src/usr.bin/host/../../contrib/bind/port/freebsd/in
clude   -I/usr/obj/usr/src/tmp/usr/include -c /usr/src/usr.bin/host/../../contri
b/bind/bin/host/host.c
/usr/src/usr.bin/host/../../contrib/bind/bin/host/host.c:149: conflicting types 
for `getaddrinfo'
/usr/obj/usr/src/tmp/usr/include/netdb.h:241: previous declaration of `getaddrin
fo'

The host.c has a static getaddrinfo function. However, this name
is used in KAME (and in fact in the IEEE POSIX 1003.1g draft) and should
therefore not be used.

The simple solution is to rename "getaddrinfo" to "addrinfo".
I have checked BIND 8.2 and it didn't contain this offending
function name, so only version 8.1.2 must be patched.

>How-To-Repeat:

	

>Fix:

*** /usr/src/contrib/bind/bin/host/host.c.orig	Sun May  3 07:09:49 1998
--- /usr/src/contrib/bind/bin/host/host.c	Thu Jun 17 08:46:10 1999
***************
*** 146,152 ****
  static int		parseclass(const char *s);
  static void		printanswer(const struct hostent *hp);
  static void		hperror(int errnum);
! static int		getaddrinfo(struct in_addr addr);
  static int		gethostinfo(char *name);
  static int		getdomaininfo(const char *name, const char *domain);
  static int		getinfo(const char *name, const char *domain,
--- 146,152 ----
  static int		parseclass(const char *s);
  static void		printanswer(const struct hostent *hp);
  static void		hperror(int errnum);
! static int		addrinfo(struct in_addr addr);
  static int		gethostinfo(char *name);
  static int		getdomaininfo(const char *name, const char *domain);
  static int		getinfo(const char *name, const char *domain,
***************
*** 285,291 ****
  				continue;
  			}
  		} else {
! 			if (getaddrinfo(addr) == 0)
  				hp = NULL;
  			else
  				hp = (struct hostent *)1;	/* XXX */
--- 285,291 ----
  				continue;
  			}
  		} else {
! 			if (addrinfo(addr) == 0)
  				hp = NULL;
  			else
  				hp = (struct hostent *)1;	/* XXX */
***************
*** 430,436 ****
  }
  
  static int
! getaddrinfo(struct in_addr addr) {
  	u_int32_t ha = ntohl(addr.s_addr);
  	char name[NS_MAXDNAME];
  
--- 430,436 ----
  }
  
  static int
! addrinfo(struct in_addr addr) {
  	u_int32_t ha = ntohl(addr.s_addr);
  	char name[NS_MAXDNAME];

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: johan 
State-Changed-When: Tue Aug 15 05:05:18 PDT 2000 
State-Changed-Why:  
Bind has been upgraded to 8.2.x which fixed this according to submitter. 
It was also MFC:d to 3.x before 3.4 


http://www.freebsd.org/cgi/query-pr.cgi?pr=12255 
>Unformatted:
