From 09fe89cd96bbc75840d8dbf963f10ebc16f4083d Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 28 Jun 2013 16:24:14 +0000 Subject: Fix build with gcc. --- sbin/swapon/swapon.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sbin/swapon') diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 84c9b42..cf9b979 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -76,6 +76,8 @@ static int run_cmd(int *, const char *, ...) __printflike(2, 3); static enum { SWAPON, SWAPOFF, SWAPCTL } orig_prog, which_prog = SWAPCTL; static int qflag; +static char aalgo_default[] = "hmac/sha256"; +static char ealgo_default[] = "aes"; int main(int argc, char **argv) @@ -319,7 +321,7 @@ swap_on_off_gbde(char *name, int doingall) static const char * swap_on_off_geli(char *name, char *mntops, int doingall) { - const char *ops, *aalgo, *ealgo, *keylen_str, *sectorsize_str; + char *ops, *aalgo, *ealgo, *keylen_str, *sectorsize_str; char *dname, *p; char args[4096]; struct stat sb; @@ -337,8 +339,8 @@ swap_on_off_geli(char *name, char *mntops, int doingall) ops = strdup(mntops); /* Default parameters for geli(8). */ - aalgo = "hmac/sha256"; - ealgo = "aes"; + aalgo = aalgo_default; + ealgo = ealgo_default; keylen = 256; sectorsize = 4096; -- cgit v1.1