]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
build: fix build failure with -fno-common
authorJan Engelhardt <jengelh@inai.de>
Wed, 8 Jan 2020 10:04:24 +0000 (11:04 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 20 Jan 2020 17:40:59 +0000 (09:40 -0800)
$ make CCOPTS=-fno-common
gcc ... -o ip
ld: rt_names.o (symbol from plugin): in function "rtnl_rtprot_n2a":
(.text+0x0): multiple definition of "numeric"; ip.o (symbol from plugin):(.text+0x0): first defined here

gcc ... -o tipc
ld: ../lib/libutil.a(utils.o):(.bss+0xc): multiple definition of `pretty';
tipc.o:tipc.c:28: first defined here

References: https://bugzilla.opensuse.org/1160244
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/rt_names.h
ip/ip.c
misc/ss.c
tc/tc.c
tipc/tipc.c

index 62ebbd6a38d0314c01755bdac404dae80f76cb69..7afce1705f77590c779e2046e6ddf9fd5b98c8e6 100644 (file)
@@ -33,4 +33,6 @@ int ll_proto_a2n(unsigned short *id, const char *buf);
 const char *nl_proto_n2a(int id, char *buf, int len);
 int nl_proto_a2n(__u32 *id, const char *arg);
 
+extern int numeric;
+
 #endif
diff --git a/ip/ip.c b/ip/ip.c
index fed26f8d48279e76f991c9c5ed31e91e467a4ced..90392c2acfa05540404e8d1db5d6df20c4435827 100644 (file)
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -23,6 +23,7 @@
 #include "ip_common.h"
 #include "namespace.h"
 #include "color.h"
+#include "rt_names.h"
 
 int preferred_family = AF_UNSPEC;
 int human_readable;
@@ -36,7 +37,6 @@ int timestamp;
 int force;
 int max_flush_loops = 10;
 int batch_mode;
-int numeric;
 bool do_all;
 
 struct rtnl_handle rth = { .fd = -1 };
index 95f1d37a4cf37f5d8f208b18f05e1660d0acbe27..1e8bca5aed3135fd9a66667127826cf70273479d 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -35,6 +35,7 @@
 #include "libnetlink.h"
 #include "namespace.h"
 #include "SNAPSHOT.h"
+#include "rt_names.h"
 
 #include <linux/tcp.h>
 #include <linux/sock_diag.h>
@@ -121,7 +122,6 @@ static int follow_events;
 static int sctp_ino;
 static int show_tipcinfo;
 static int show_tos;
-int numeric;
 int oneline;
 
 enum col_id {
diff --git a/tc/tc.c b/tc/tc.c
index 37294b31c7dcb8d7c58fec4327b07aef4cc5fd21..b72657ec2e60c8430d850c187b0ef6dcc6d7a268 100644 (file)
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -29,6 +29,7 @@
 #include "tc_util.h"
 #include "tc_common.h"
 #include "namespace.h"
+#include "rt_names.h"
 
 int show_stats;
 int show_details;
@@ -43,7 +44,6 @@ bool use_names;
 int json;
 int color;
 int oneline;
-int numeric;
 
 static char *conf_file;
 
index f85ddee0e278d8ff99dd3ab6fce7c274683fe814..60176a044f8d518309be4f625715e7b6d32b470f 100644 (file)
 #include "node.h"
 #include "peer.h"
 #include "cmdl.h"
+#include "utils.h"
 
 int help_flag;
 int json;
-int pretty;
 
 static void about(struct cmdl *cmdl)
 {