1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

Add test for "struct in6_addr" to the HAVE_IPV6 configure test.

Also make use of "if defined(HAVE_IPV6)" rather than testing for
AF_INET6 since this is not sufficient on HP-UX 11.11 to ensure
a working IPv6 implementation.
This commit is contained in:
Gerald (Jerry) Carter
2007-10-19 08:14:12 -05:00
committed by Jeremy Allison
parent 641d0968da
commit 620785df4e
5 changed files with 14 additions and 13 deletions

View File

@@ -339,7 +339,7 @@ bool make_netmask(struct sockaddr_storage *pss_out,
{
*pss_out = *pss_in;
/* Now apply masklen bits of mask. */
#if defined(AF_INET6)
#if defined(HAVE_IPV6)
if (pss_in->ss_family == AF_INET6) {
char *p = (char *)&((struct sockaddr_in6 *)pss_out)->sin6_addr;
unsigned int i;
@@ -386,7 +386,7 @@ static void make_bcast_or_net(struct sockaddr_storage *pss_out,
*pss_out = *pss_in;
/* Set all zero netmask bits to 1. */
#if defined(AF_INET6)
#if defined(HAVE_IPV6)
if (pss_in->ss_family == AF_INET6) {
p = (char *)&((struct sockaddr_in6 *)pss_out)->sin6_addr;
pmask = (char *)&((struct sockaddr_in6 *)nmask)->sin6_addr;