Fixed a 'AF_INET6-not-defined" error in previous checkin. Bugzilla 25111. NSPRPUB_RELEASE_4_0_BRANCH
authorsrinivas%netscape.com
Tue, 01 Feb 2000 01:39:17 +0000
branchNSPRPUB_RELEASE_4_0_BRANCH
changeset 1128 1362f115230f6618e170a0d950e42bafaa17146c
parent 1127 31d8a199836031ffce186bcb2891a0a34c399b10
child 1131 359113e056950b96b3f14a2934a8de7d5c6f4ed9
push idunknown
push userunknown
push dateunknown
bugs25111
Fixed a 'AF_INET6-not-defined" error in previous checkin. Bugzilla 25111.
pr/src/misc/prnetdb.c
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -609,20 +609,24 @@ PR_IMPLEMENT(PRStatus) PR_GetHostByAddr(
 #endif
 	}
 	else
 	{
 		PR_ASSERT(hostaddr->raw.family == AF_INET);
 		af = AF_INET;
 	}
 	if (hostaddr->raw.family == PR_AF_INET6) {
+#if defined(_PR_INET6) || defined(_PR_INET6_PROBE)
 		if (af == AF_INET6) {
 			addr = &hostaddr->ipv6.ip;
 			addrlen = sizeof(hostaddr->ipv6.ip);
-		} else {
+		}
+		else
+#endif
+		{
 			PR_ASSERT(af == AF_INET);
 			if (!_PR_IN6_IS_ADDR_V4MAPPED(&hostaddr->ipv6.ip)) {
 				PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
 				return rv;
 			}
 			tmp_ip = _PR_IN6_V4MAPPED_TO_IPADDR((PRIPv6Addr *)
 												&hostaddr->ipv6.ip);
 			addr = &tmp_ip;