ujail: don't pass unused arg in clone call
authorEtienne CHAMPETIER <champetier.etienne@gmail.com>
Fri, 27 Nov 2015 16:27:01 +0000 (16:27 +0000)
committerJohn Crispin <blogic@openwrt.org>
Fri, 27 Nov 2015 16:48:49 +0000 (17:48 +0100)
clone() call need a function with "void *" arg
(else we have a compilation error)

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
jail/jail.c

index 56dc9cab7337d829e5b10b192cdb50fb04f3ef88..9952ed938f660a6c7ea2ecce47339d46361e6aeb 100644 (file)
@@ -272,7 +272,7 @@ static int exec_jail()
        exit(EXIT_FAILURE);
 }
 
-static int spawn_jail(void *arg)
+static int spawn_jail(void *_notused)
 {
        if (opts.name && sethostname(opts.name, strlen(opts.name))) {
                ERROR("failed to sethostname: %s\n", strerror(errno));
@@ -424,7 +424,7 @@ int main(int argc, char **argv)
        if (opts.namespace) {
                jail_process.pid = clone(spawn_jail,
                        child_stack + STACK_SIZE,
-                       CLONE_NEWUTS | CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | SIGCHLD, argv);
+                       CLONE_NEWUTS | CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | SIGCHLD, NULL);
        } else {
                jail_process.pid = fork();
        }