From 49cbb576f142032e1fb687a58284a1d032d87770 Mon Sep 17 00:00:00 2001 From: renmingshuai Date: Fri, 30 Jul 2021 21:35:20 +0800 Subject: [PATCH] fix multiple definition with gcc 10 --- client/dhclient.c | 4 ++-- relay/dhcrelay.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/dhclient.c b/client/dhclient.c index 2a17bfd..f2c2630 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -93,8 +93,8 @@ static const char message [] = "Internet Systems Consortium DHCP Client"; static const char url [] = "For info, please visit https://www.isc.org/software/dhcp/"; #endif /* UNIT_TEST */ -u_int16_t local_port = 0; -u_int16_t remote_port = 0; +extern u_int16_t local_port; +extern u_int16_t remote_port; #if defined(DHCPv6) && defined(DHCP4o6) int dhcp4o6_state = -1; /* -1 = stopped, 0 = polling, 1 = started */ #endif diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index 155dd37..b487373 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -104,8 +104,8 @@ enum { forward_and_append, /* Forward and append our own relay option. */ forward_untouched, /* Forward without changes. */ discard } agent_relay_mode = forward_and_replace; -u_int16_t local_port; -u_int16_t remote_port; +extern u_int16_t local_port; +extern u_int16_t remote_port; /* Relay agent server list. */ struct server_list { -- 1.8.3.1