diff --git a/stand/libsa/environment.c b/stand/libsa/environment.c index 291e33004430..83349f1a8fe5 100644 --- a/stand/libsa/environment.c +++ b/stand/libsa/environment.c @@ -162,7 +162,7 @@ setenv(const char *name, const char *value, int overwrite) } int -putenv(const char *string) +putenv(char *string) { char *value, *copy; int result; diff --git a/stand/libsa/libstand.3 b/stand/libsa/libstand.3 index 862d60bbd612..40947eb692ea 100644 --- a/stand/libsa/libstand.3 +++ b/stand/libsa/libstand.3 @@ -110,7 +110,7 @@ for set/unset hook functions. .Xc .It Xo .Ft int -.Fn putenv "const char *string" +.Fn putenv "char *string" .Xc .It Xo .Ft int diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index e4350522c0eb..13feb152d36b 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -330,7 +330,7 @@ extern int env_setenv(const char *name, int flags, extern char *getenv(const char *name); extern int setenv(const char *name, const char *value, int overwrite); -extern int putenv(const char *string); +extern int putenv(char *string); extern int unsetenv(const char *name); extern ev_sethook_t env_noset; /* refuse set operation */ diff --git a/stand/userboot/test/test.c b/stand/userboot/test/test.c index 1cee79ce1049..5efe1d3784de 100644 --- a/stand/userboot/test/test.c +++ b/stand/userboot/test/test.c @@ -367,10 +367,10 @@ test_getmem(void *arg, uint64_t *lowmem, uint64_t *highmem) *highmem = 0; } -const char * +char * test_getenv(void *arg, int idx) { - static const char *vars[] = { + static char *vars[] = { "foo=bar", "bar=barbar", NULL diff --git a/stand/userboot/userboot.h b/stand/userboot/userboot.h index 7ffb06f652aa..2e4a4b4cfcec 100644 --- a/stand/userboot/userboot.h +++ b/stand/userboot/userboot.h @@ -202,7 +202,7 @@ struct loader_callbacks { * environment variable to return next. It will begin at 0 and * each invocation will add 1 to the previous value of 'num'. */ - const char * (*getenv)(void *arg, int num); + char * (*getenv)(void *arg, int num); /* * Version 4 additions. diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c index 9e69724b17a9..7f59eb7c3bdd 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -78,7 +78,7 @@ void loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) { static char mallocbuf[MALLOCSZ]; - const char *var; + char *var; int i; if (version < USERBOOT_VERSION) diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 7147f5e0701f..af6c6c98d7f6 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -529,7 +529,7 @@ addenv(const char *str) SLIST_INSERT_HEAD(&envhead, env, next); } -static const char * +static char * cb_getenv(void *arg, int num) { int i;