1 Star 0 Fork 25

Apricity/dhcp

forked from src-openEuler/dhcp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-multiple-definition-with-gcc-10-1.patch 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
renmingshuai 提交于 2022-01-08 17:16 . name patches in openEuler format
From 49cbb576f142032e1fb687a58284a1d032d87770 Mon Sep 17 00:00:00 2001
From: renmingshuai <renmingshuai@huawei.com>
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zengwefeng/dhcp.git
git@gitee.com:zengwefeng/dhcp.git
zengwefeng
dhcp
dhcp
master

搜索帮助