Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 11:21:20 +0300 (EEST)
From:      martti.kuparinen@research.zopps.fi
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/12255: BIND 8.1.2 compilation error in IPv6 capable host
Message-ID:  <199906170821.LAA89404@ws125.research.zopps.fi>

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

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 17 01:30:00 PDT 1999
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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