Fix build on Linux

This commit is contained in:
manu 2006-09-15 09:40:44 +00:00
parent 382a67e7e4
commit 2b7658dc54
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,6 @@
2006-08-15 Emmanuel Dreyfus <manu@netbsd.org>
* src/racoon/ipsec_doi.c: fix build on Linux
---------------------------------------------
Migration to cvs.netbsd.org

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec_doi.c,v 1.13 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: ipsec_doi.c,v 1.14 2006/09/15 09:40:45 manu Exp $ */
/* Id: ipsec_doi.c,v 1.55 2006/08/17 09:20:41 vanhu Exp */
@ -4100,7 +4100,9 @@ ipsecdoi_id2str(id)
case IPSECDOI_ID_IPV4_ADDR_SUBNET:
case IPSECDOI_ID_IPV4_ADDR_RANGE:
#ifndef __linux__
saddr.sa_len = sizeof(struct sockaddr_in);
#endif
saddr.sa_family = AF_INET;
((struct sockaddr_in *)&saddr)->sin_port = IPSEC_PORT_ANY;
memcpy(&((struct sockaddr_in *)&saddr)->sin_addr,
@ -4111,7 +4113,9 @@ ipsecdoi_id2str(id)
case IPSECDOI_ID_IPV6_ADDR_SUBNET:
case IPSECDOI_ID_IPV6_ADDR_RANGE:
#ifndef __linux__
saddr.sa_len = sizeof(struct sockaddr_in6);
#endif
saddr.sa_family = AF_INET6;
((struct sockaddr_in6 *)&saddr)->sin6_port = IPSEC_PORT_ANY;
memcpy(&((struct sockaddr_in6 *)&saddr)->sin6_addr,
@ -4189,7 +4193,9 @@ ipsecdoi_id2str(id)
len = snprintf( buf, BUFLEN, "%s-", saddrwop2str(&saddr));
#ifndef __linux__
saddr.sa_len = sizeof(struct sockaddr_in);
#endif
saddr.sa_family = AF_INET;
((struct sockaddr_in *)&saddr)->sin_port = IPSEC_PORT_ANY;
memcpy(&((struct sockaddr_in *)&saddr)->sin_addr,
@ -4205,7 +4211,9 @@ ipsecdoi_id2str(id)
len = snprintf( buf, BUFLEN, "%s-", saddrwop2str(&saddr));
#ifndef __linux__
saddr.sa_len = sizeof(struct sockaddr_in6);
#endif
saddr.sa_family = AF_INET6;
((struct sockaddr_in6 *)&saddr)->sin6_port = IPSEC_PORT_ANY;
memcpy(&((struct sockaddr_in6 *)&saddr)->sin6_addr,