Fix build with gcc10/-fno-common

Signed-off-by: Khem Raj <[email protected]>
---
 .../wifi-test-suite/files/fno-common.patch    | 29 +++++++++++++++++++
 .../wifi-test-suite/wifi-test-suite_git.bb    |  3 +-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-connectivity/wifi-test-suite/files/fno-common.patch

diff --git 
a/meta-oe/recipes-connectivity/wifi-test-suite/files/fno-common.patch 
b/meta-oe/recipes-connectivity/wifi-test-suite/files/fno-common.patch
new file mode 100644
index 0000000000..fc5e2e99c5
--- /dev/null
+++ b/meta-oe/recipes-connectivity/wifi-test-suite/files/fno-common.patch
@@ -0,0 +1,29 @@
+Mark extern variables with 'extern' keyword
+
+This ensures that compilers with -fno-common does not generate multiple 
definitions
+
+Upstream-Status: Pending
+Signedd-off-by: Khem Raj <[email protected]>
+
+--- a/lib/wfa_cs.c
++++ b/lib/wfa_cs.c
+@@ -71,7 +71,7 @@ int wfaExecuteCLI(char *CLI);
+ 
+ /* Since the two definitions are used all over the CA function */
+ char gCmdStr[WFA_CMD_STR_SZ];
+-dutCmdResponse_t gGenericResp;
++extern dutCmdResponse_t gGenericResp;
+ int wfaTGSetPrio(int sockfd, int tgClass);
+ void create_apts_msg(int msg, unsigned int txbuf[],int id);
+ 
+--- a/lib/wfa_thr.c
++++ b/lib/wfa_thr.c
+@@ -41,7 +41,7 @@
+ /*
+  * external global thread sync variables
+  */
+-tgWMM_t wmm_thr[WFA_THREADS_NUM];
++extern tgWMM_t wmm_thr[WFA_THREADS_NUM];
+ extern int resetsnd;
+ extern int resetrcv;
+ extern int newCmdOn;
diff --git 
a/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb 
b/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
index 99cfb32051..cb39f5a0e1 100644
--- a/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
+++ b/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
@@ -8,12 +8,13 @@ LIC_FILES_CHKSUM = 
"file://LICENSE.txt;md5=0542427ed5c315ca34aa09ae7a85ed32"
 SECTION = "test"
 
 S = "${WORKDIR}/git"
-SRCREV = "f7a8d7ef7d1a831c1bb47de21fa083536ea2f3a9"
+SRCREV = "2da947374c8324f88a0e2155aeba4cf75464b0d8"
 SRC_URI = "git://github.com/Wi-FiTestSuite/Wi-FiTestSuite-Linux-DUT.git \
        file://0001-Use-toolchain-from-environment-variables.patch \
        file://0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch \
        file://0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch \
        file://0004-run-ranlib-per-library-and-use-AR.patch \
+        file://fno-common.patch \
 "
 
 # to avoid host path QA error
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#86380): 
https://lists.openembedded.org/g/openembedded-devel/message/86380
Mute This Topic: https://lists.openembedded.org/mt/76183011/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to