From ca1901ea70035c83db409c9619a00a39ad0498ef Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Sat, 25 May 2024 16:46:39 -0400 Subject: [PATCH] openrc-init: replace putenv with setenv Avoids compiler warning about discarded const. Signed-off-by: Mike Gilbert --- src/openrc-init/openrc-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrc-init/openrc-init.c b/src/openrc-init/openrc-init.c index 90fdcbb4d..a880a20b5 100644 --- a/src/openrc-init/openrc-init.c +++ b/src/openrc-init/openrc-init.c @@ -242,7 +242,7 @@ int main(int argc, char **argv) if (getenv("SELINUX_INIT") == NULL) { if (is_selinux_enabled() != 1) { if (selinux_init_load_policy(&enforce) == 0) { - putenv("SELINUX_INIT=YES"); + setenv("SELINUX_INIT", "YES", 1); execv(argv[0], argv); } else { if (enforce > 0) {