]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
lib: fix warning in namespace.h
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 15 Jan 2015 10:36:24 +0000 (11:36 +0100)
committerStephen Hemminger <shemming@brocade.com>
Thu, 5 Feb 2015 18:11:35 +0000 (10:11 -0800)
Warning was:
In file included from bridge.c:16:0:
../include/namespace.h:33:12: warning: ‘setns’ defined but not used [-Wunused-function]

CC: Vadim Kochan <vadim4j@gmail.com>
Fixes: eb67e4498aec ("lib: Add netns_switch func for change network namespace")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
include/namespace.h

index b8c5cad6aaa28f368af2905b203471e77ae88288..28a4223b3eb2066beee681d6cd9cd1e8a6eb9619 100644 (file)
@@ -30,7 +30,7 @@
 #endif
 
 #ifndef HAVE_SETNS
-static int setns(int fd, int nstype)
+static inline int setns(int fd, int nstype)
 {
 #ifdef __NR_setns
        return syscall(__NR_setns, fd, nstype);