Subject: Re: kernel with FAST_IPSEC fails to compile
To: None <current-users@netbsd.org>
From: Eric Haszlakiewicz <erh@jodi.nimenees.com>
List: current-users
Date: 06/10/2005 10:53:32
On Fri, Jun 10, 2005 at 10:05:01AM +0200, Jukka Salmi wrote:
> --- src/sys/netipsec/ipsec.c.orig	2005-06-10 09:30:23.000000000 +0200
> +++ src/sys/netipsec/ipsec.c	2005-06-10 01:36:18.000000000 +0200
> @@ -2093,7 +2093,7 @@
>  #endif /* INET6 */
>  
>  	default:
> -		return "(unknown address family)";
> +		return __UNCONST("(unknown address family)");
>  	}
>  }
It'd be better to change:
char *
ipsec_address(union sockaddr_union* sa)

to
const char *

>  
> --- src/sys/netipsec/xform_ah.c.orig	2005-06-10 09:30:25.000000000 +0200
> +++ src/sys/netipsec/xform_ah.c	2005-06-10 01:37:07.000000000 +0200
> @@ -1264,7 +1264,7 @@
>  }
>  
>  static struct xformsw ah_xformsw = {
> -	XF_AH,		XFT_AUTH,	"IPsec AH",
> +	XF_AH,		XFT_AUTH,	__UNCONST("IPsec AH"),
>  	ah_init,	ah_zeroize,	ah_input,	ah_output,
>  };
	Same thing here.  The xformsw struct should be changed from
...
    char    *xf_name;           /* human-readable name */
...

to
	const char *xf_name;


etc... for the other places you used __UNCONST.

eric