Skip to content

Commit

Permalink
openrc-init: replace putenv with setenv
Browse files Browse the repository at this point in the history
Avoids compiler warning about discarded const.

Signed-off-by: Mike Gilbert <[email protected]>
  • Loading branch information
floppym authored and navi-desu committed Jul 23, 2024
1 parent 513ce77 commit ca1901e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openrc-init/openrc-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ca1901e

Please sign in to comment.