PERFORCE change 104284 for review

Michael Bushkov bushman at FreeBSD.org
Wed Aug 16 19:53:07 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104284

Change 104284 by bushman at bushman_nss_ldap_cached on 2006/08/16 19:52:26

	Bug fix - couldn't be built with INET6 turned off.

Affected files ...

.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/name6.c#4 edit

Differences ...

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/name6.c#4 (text+ko) ====

@@ -195,8 +195,8 @@
 
 static struct	 hostent *_hpcopy(struct hostent *, int *);
 static struct	 hostent *_hpaddr(int, const char *, void *, int *);
+#ifdef INET6
 static struct	 hostent *_hpmerge(struct hostent *, struct hostent *, int *);
-#ifdef INET6
 static struct	 hostent *_hpmapv6(struct hostent *, int *);
 #endif
 static struct	 hostent *_hpsort(struct hostent *, res_state);
@@ -522,6 +522,7 @@
 	return (_hpcopy(hp, errp));
 }
 
+#ifdef INET6
 /*
  * _hpmerge: merge 2 hostent structure, arguments will be freed
  */
@@ -558,17 +559,14 @@
 		}
 	}
 	aliases[nalias] = NULL;
-#ifdef INET6
 	if (hp1->h_length != hp2->h_length) {
 		hp->h_addrtype = AF_INET6;
 		hp->h_length = sizeof(struct in6_addr);
 	} else {
-#endif
 		hp->h_addrtype = hp1->h_addrtype;
 		hp->h_length = hp1->h_length;
-#ifdef INET6
 	}
-#endif
+
 	hp->h_addr_list = addrs;
 	naddr = 0;
 	for (i = 1; i <= 2; i++) {
@@ -589,6 +587,7 @@
 	addrs[naddr] = NULL;
 	return (_hpcopy(hp, errp));
 }
+#endif
 
 /*
  * _hpmapv6: convert IPv4 hostent into IPv4-mapped IPv6 addresses


More information about the p4-projects mailing list