From 8ac985b47ab804ff848e549c63fe4da0ffd88d12 Mon Sep 17 00:00:00 2001 From: Fugang Duan Date: Thu, 17 Sep 2020 13:16:44 +0800 Subject: [PATCH] 8997: mapp: fix build error by GCC10.2 Use GCC10.2, there has build error as below log: mlan2040misc.o:(.bss+0x0): multiple definition of `leg_ap_chan_list'; mlan2040coex.o:(.bss+0x0): first defined here mlan2040misc.o:(.bss+0x64): multiple definition of `num_leg_ap_chan'; mlan2040coex.o:(.bss+0x64): first defined here Fix the build error. Signed-off-by: Fugang Duan --- mwifiex_8997/mapp/mlan2040coex/mlan2040coex.c | 5 +++++ mwifiex_8997/mapp/mlan2040coex/mlan2040coex.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.c b/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.c index 79d0709..328108c 100755 --- a/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.c +++ b/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.c @@ -53,6 +53,11 @@ Change log: /** Maximum number of total private ioctl calls supported */ #define IW_MAX_PRIV_NUM 1024 +/** Legacy APs channel list */ +chan_intol_t leg_ap_chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX]; +/** Total number of channel present in Legacy APs channel list */ +t_u8 num_leg_ap_chan; + /******************************************************** Local Variables ********************************************************/ diff --git a/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.h b/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.h index b0b79d4..9e019f1 100755 --- a/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.h +++ b/mwifiex_8997/mapp/mlan2040coex/mlan2040coex.h @@ -222,9 +222,9 @@ struct eth_priv_cmd { #endif /** Legacy APs channel list */ -chan_intol_t leg_ap_chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX]; +extern chan_intol_t leg_ap_chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX]; /** Total number of channel present in Legacy APs channel list */ -t_u8 num_leg_ap_chan; +extern t_u8 num_leg_ap_chan; int get_region_code(int *reg_code); int process_host_cmd(int cmd, t_u8 *chan_list, t_u8 chan_num, t_u8 reg_class, t_u8 is_intol_ap_present);