ip: Fixed build issue 25/180725/1 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181102.024524 accepted/tizen/unified/20180611.015541 submit/tizen/20180604.023009 submit/tizen/20180607.113300 submit/tizen_5.0/20181101.000006
authorSaurav Babu <saurav.babu@samsung.com>
Fri, 1 Jun 2018 10:36:38 +0000 (16:06 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Fri, 1 Jun 2018 10:36:38 +0000 (16:06 +0530)
ipnetns.c:47:12: error: static declaration of 'setns' follows non-static
declaration
[ 16s] static int setns(int fd, int nstype)
[ 16s] ^~~~~
[ 16s] In file included from /usr/include/sched.h:43:0,
[ 16s] from ipnetns.c:11:
[ 16s] /usr/include/bits/sched.h:92:12: note: previous declaration of 'setns' was here
[ 16s] extern int setns (int __fd, int __nstype) __THROW;
[ 16s] ^~~~~
[ 16s] : recipe for target 'ipnetns.o' failed
[ 16s] make[1]: *** [ipnetns.o] Error 1

Change-Id: Ifdb58bf38b6800bcd4f2e2c7d9a0a87c7e60f418
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
ip/Makefile
ip/ipnetns.c

index 2b606d4..4fd95b9 100644 (file)
@@ -15,6 +15,8 @@ ifeq ($(IP_CONFIG_SETNS),y)
        CFLAGS += -DHAVE_SETNS
 endif
 
+CFLAGS += -DTIZEN_EXT
+
 ALLOBJ=$(IPOBJ) $(RTMONOBJ)
 SCRIPTS=ifcfg rtpr routel routef
 TARGETS=ip rtmon
index c9bc20a..820df31 100644 (file)
 
 
 #ifndef HAVE_SETNS
+#ifdef TIZEN_EXT
+int setns(int fd, int nstype)
+#else
 static int setns(int fd, int nstype)
+#endif /* TIZEN_EXT */
 {
 #ifdef __NR_setns
        return syscall(__NR_setns, fd, nstype);