]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
setproctitle compat requires envp, not environ
authorRoy Marples <roy@marples.name>
Sat, 10 Oct 2020 13:44:00 +0000 (14:44 +0100)
committerRoy Marples <roy@marples.name>
Sat, 10 Oct 2020 13:44:00 +0000 (14:44 +0100)
The two could be different!
envp is NOT C or POSIX standard, but does appear to be a UNIX standard.

src/dhcpcd.c

index 8220219d8ebd69eff385c8e1da9bc5fcc41f3876..82559933b75eae79e69f8d351a410c4fe45c3a42 100644 (file)
@@ -1767,7 +1767,7 @@ dhcpcd_stderr_cb(void *arg)
 }
 
 int
-main(int argc, char **argv)
+main(int argc, char **argv, char **envp)
 {
        struct dhcpcd_ctx ctx;
        struct ifaddrs *ifaddrs = NULL;
@@ -1788,7 +1788,7 @@ main(int argc, char **argv)
 #endif
 
 #ifdef SETPROCTITLE_H
-       setproctitle_init(argc, argv, environ);
+       setproctitle_init(argc, argv, envp);
 #endif
 
        /* Test for --help and --version */