From: Dan McGee <dan@archlinux.org>
To: netdev@vger.kernel.org
Cc: Dan McGee <dan@archlinux.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH] Rename static setns() function
Date: Fri, 15 Jul 2011 13:38:19 -0500 [thread overview]
Message-ID: <1310755099-32438-1-git-send-email-dan@archlinux.org> (raw)
Fixes the following error:
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
-DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -c -o ipnetns.o ipnetns.c
ipnetns.c:31:12: error: static declaration of ‘setns’ follows non-static
declaration
/usr/include/bits/sched.h:93:12: note: previous declaration of ‘setns’
was here
make[1]: *** [ipnetns.o] Error 1
Fixes issue introduced in commit 0dc34c7713bb7055.
Signed-off-by: Dan McGee <dan@archlinux.org>
---
ip/ipnetns.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index db7007c..46230ad 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -28,7 +28,7 @@
#define MNT_DETACH 0x00000002 /* Just detach from the tree */
#endif /* MNT_DETACH */
-static int setns(int fd, int nstype)
+static int do_setns(int fd, int nstype)
{
#ifdef __NR_setns
return syscall(__NR_setns, fd, nstype);
@@ -150,7 +150,7 @@ static int netns_exec(int argc, char **argv)
strerror(errno));
return -1;
}
- if (setns(netns, CLONE_NEWNET) < 0) {
+ if (do_setns(netns, CLONE_NEWNET) < 0) {
fprintf(stderr, "seting the network namespace failed: %s\n",
strerror(errno));
return -1;
--
1.7.6
next reply other threads:[~2011-07-15 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 18:38 Dan McGee [this message]
2011-07-15 22:58 ` [PATCH] Rename static setns() function David Miller
2011-07-15 23:41 ` Eric W. Biederman
2011-07-16 0:02 ` Dan McGee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310755099-32438-1-git-send-email-dan@archlinux.org \
--to=dan@archlinux.org \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.