summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2018-10-28 16:14:37 +0000
committerSami Kerola <kerolasa@iki.fi>2018-10-28 16:16:18 +0000
commitfc8781c488f99aa326de4b717228414612a14fb9 (patch)
treeb4b1fddbb96a80d20bf1cc60347652a4f4bda9f5
parent44d747a330f33fa3b98428daa01d632d1dcde53e (diff)
downloadiputils-fc8781c488f99aa326de4b717228414612a14fb9.tar.gz
ping: fix global variable scope
Mark device variable to be shared in ping source files. This fixes linker issue that is reported when al gcc warnings are enabled. /usr/bin/ld: ping@exe/ping6_common.c.o:(.bss.device+0x0): multiple definition of `device'; ping@exe/ping.c.o:(.bss.device+0x0): first defined here Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r--ping6_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ping6_common.c b/ping6_common.c
index 21e99bd..b0d53da 100644
--- a/ping6_common.c
+++ b/ping6_common.c
@@ -82,7 +82,7 @@ static size_t cmsglen = 0;
static int pr_icmph(uint8_t type, uint8_t code, uint32_t info);
struct sockaddr_in6 source6 = { .sin6_family = AF_INET6 };
-char *device;
+extern char *device;
#if defined(USE_GCRYPT) || defined(USE_OPENSSL) || defined(USE_NETTLE)
#include "iputils_md5dig.h"