From patchwork Wed Nov 25 17:54:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Champetier X-Patchwork-Id: 548681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DC3C51402B8 for ; Thu, 26 Nov 2015 04:57:31 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=RCNu6u9I; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 000B028C006; Wed, 25 Nov 2015 18:56:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2468728BEC6 for ; Wed, 25 Nov 2015 18:55:02 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 25 Nov 2015 18:55:02 +0100 (CET) Received: by wmuu63 with SMTP id u63so148159414wmu.0 for ; Wed, 25 Nov 2015 09:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HdA/GlV3etHmi/vEbCTlBGzrTtaKyXWRvb7bazm8u28=; b=RCNu6u9Iyye5ItYegOho3epoHdWLRbLpCRqxBTkK0kKqwMlmstk4w+biUcqopGeu+M /X0ckf7UoJA0mgsuBIN1e64N9vn2ouBR7UKvXXUA9yIu5ZI5AWQqv4BjYj9NuLxYGJFz prV1hQz9nOB9pJJAd3jHdzTglpufC3zeT8jYjErvqwL0W0VNIZGFXRt1EpBJOdOZKdpE Jim4Dbj6yYbsdin49l/SdZkfkxrpVanbU7iVtVbSFFzVdAlUxc8XvyPz9RSjz7yptINa ZJxVhF6riiGFYLRNpSVFCIRNap69nPn9gR2sgks2h9PW9Vxp5KAyhTBDg8fr8mfb0YB8 gpmg== X-Received: by 10.28.215.211 with SMTP id o202mr5769616wmg.85.1448474101038; Wed, 25 Nov 2015 09:55:01 -0800 (PST) Received: from ubuntu1404.lxcnattst (ns623510.ovh.net. [5.135.134.9]) by smtp.gmail.com with ESMTPSA id cv3sm24180221wjc.20.2015.11.25.09.55.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Nov 2015 09:55:00 -0800 (PST) From: Etienne CHAMPETIER To: OpenWrt Development List Date: Wed, 25 Nov 2015 17:54:35 +0000 Message-Id: <1448474090-30280-3-git-send-email-champetier.etienne@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448474090-30280-1-git-send-email-champetier.etienne@gmail.com> References: <1448474090-30280-1-git-send-email-champetier.etienne@gmail.com> Subject: [OpenWrt-Devel] [PATCH procd v2 02/17] ujail: don't pass unused arg in clone call X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" clone() call need a function with "void *" arg (else we have a compilation error) Signed-off-by: Etienne CHAMPETIER --- jail/jail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jail/jail.c b/jail/jail.c index 56dc9ca..9952ed9 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -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(); }