From: svaidhya Date: Fri, 9 Aug 2024 04:53:20 +0000 (+0530) Subject: [Epic-Id: ODUHIGH-613][Task-Id: ODUHIGH-622]| NFAPI_BRANCH | Changes related to ERROR... X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=219154c4069babf002697d8d0b2e749f9e60d597;p=o-du%2Fl2.git [Epic-Id: ODUHIGH-613][Task-Id: ODUHIGH-622]| NFAPI_BRANCH | Changes related to ERROR: Multiple Definition in Ubuntu Server Change-Id: Ife0cfa4203a3009268c02ada5c3120f545ec67aa Signed-off-by: svaidhya --- diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 29899feb2..a818cdd54 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -33,8 +33,6 @@ #ifdef NFAPI_ENABLED #include "nfapi_interface.h" #include "nfapi_vnf_fsm.h" - -extern NfapiVnfDb vnfDb; #endif uint8_t ssbPeriodicity[6] = {5, 10, 20, 40, 80, 160}; diff --git a/src/5gnrmac/nfapi_common.h b/src/5gnrmac/nfapi_common.h index c5c4bf278..8d89a974d 100644 --- a/src/5gnrmac/nfapi_common.h +++ b/src/5gnrmac/nfapi_common.h @@ -201,8 +201,8 @@ } /*Global Variable*/ -uint32_t PER_TTI_TIME_USEC; -uint8_t NUM_SLOTS_PER_SUBFRAME; +extern uint32_t PER_TTI_TIME_USEC; +extern uint8_t NUM_SLOTS_PER_SUBFRAME; /*Common Functions*/ void nfapiFillP5Hdr(Buffer *mBuf); diff --git a/src/5gnrmac/nfapi_p7_clk.c b/src/5gnrmac/nfapi_p7_clk.c index 8e1abf3c3..5100fb82c 100644 --- a/src/5gnrmac/nfapi_p7_clk.c +++ b/src/5gnrmac/nfapi_p7_clk.c @@ -41,8 +41,8 @@ #include "mac_utils.h" #include "nfapi_p7_msg_hdl.h" -extern uint32_t PER_TTI_TIME_USEC; -extern uint8_t NUM_SLOTS_PER_SUBFRAME; +uint32_t PER_TTI_TIME_USEC; +uint8_t NUM_SLOTS_PER_SUBFRAME; /************************************************************************** * @brief Task Initiation callback function. diff --git a/src/5gnrmac/nfapi_p7_msg_hdl.c b/src/5gnrmac/nfapi_p7_msg_hdl.c index 6c777f1ae..ca2acd6fc 100644 --- a/src/5gnrmac/nfapi_p7_msg_hdl.c +++ b/src/5gnrmac/nfapi_p7_msg_hdl.c @@ -31,8 +31,6 @@ #include "nfapi_common.h" #include "nfapi_udp_p7.h" -extern NfapiVnfDb vnfDb; - /*********************************************************************** * * @brief Pack parameters of Precoding and Beamforming diff --git a/src/5gnrmac/nfapi_vnf_fsm.c b/src/5gnrmac/nfapi_vnf_fsm.c index 6983a33b4..953a59741 100644 --- a/src/5gnrmac/nfapi_vnf_fsm.c +++ b/src/5gnrmac/nfapi_vnf_fsm.c @@ -29,6 +29,8 @@ #include "mac_utils.h" #include "lwr_mac_fsm.h" +NfapiVnfDb vnfDb; + /******************************************************************* * * @brief Initalization of VNF Database diff --git a/src/5gnrmac/nfapi_vnf_fsm.h b/src/5gnrmac/nfapi_vnf_fsm.h index 8c5cea3e9..6eb571f9b 100644 --- a/src/5gnrmac/nfapi_vnf_fsm.h +++ b/src/5gnrmac/nfapi_vnf_fsm.h @@ -119,7 +119,7 @@ typedef struct nfapiVnfDb }NfapiVnfDb; /* Global variables */ -NfapiVnfDb vnfDb; +extern NfapiVnfDb vnfDb; void nFapiVnfInit(); typedef uint8_t (*nFapiVnfFsmHdlr)(nFapi_p5_hdr *, nFapi_msg_header *, void *); diff --git a/src/pnf_stub/pnf_stub.c b/src/pnf_stub/pnf_stub.c index df75c81cd..df299c970 100644 --- a/src/pnf_stub/pnf_stub.c +++ b/src/pnf_stub/pnf_stub.c @@ -38,9 +38,9 @@ #include "pnf_stub.h" #include "pnf_stub_p5_msg_hdl.h" -extern uint32_t PER_TTI_TIME_USEC; -extern uint8_t NUM_SLOTS_PER_SUBFRAME; -extern PnfGlobalCb pnfCb; +uint32_t PER_TTI_TIME_USEC; +uint8_t NUM_SLOTS_PER_SUBFRAME; +PnfGlobalCb pnfCb; void init_log() { diff --git a/src/pnf_stub/pnf_stub.h b/src/pnf_stub/pnf_stub.h index 40edd3c1d..e6befb58b 100644 --- a/src/pnf_stub/pnf_stub.h +++ b/src/pnf_stub/pnf_stub.h @@ -111,8 +111,8 @@ #define CONFDC_LEVEL_BAD 1 #define SLOT_DELAY 3 -uint32_t PER_TTI_TIME_USEC; -uint8_t NUM_SLOTS_PER_SUBFRAME; +extern uint32_t PER_TTI_TIME_USEC; +extern uint8_t NUM_SLOTS_PER_SUBFRAME; typedef enum { @@ -183,7 +183,7 @@ typedef struct pnfGlobalCb //DuDb duInfo[MAX_DU_SUPPORTED]; /*TODO: VNF Database can be added*/ }PnfGlobalCb; -PnfGlobalCb pnfCb; +extern PnfGlobalCb pnfCb; uint8_t p5MsgHandlerAtPnf(Buffer *mBuf); void nfapiFillP5Hdr(Buffer *mBuf); diff --git a/src/pnf_stub/pnf_stub_p5_msg_hdl.c b/src/pnf_stub/pnf_stub_p5_msg_hdl.c index 0419c8268..8e0ef6ec2 100644 --- a/src/pnf_stub/pnf_stub_p5_msg_hdl.c +++ b/src/pnf_stub/pnf_stub_p5_msg_hdl.c @@ -39,7 +39,6 @@ #include "pnf_stub_p7_udp.h" #include "pnf_stub.h" -PnfGlobalCb pnfCb; /********************************************************************************* * * @Function Name: buildAndSendPnfReadyInd diff --git a/src/pnf_stub/pnf_stub_p7_msg_hdl.c b/src/pnf_stub/pnf_stub_p7_msg_hdl.c index 78179386c..0c65ce9df 100644 --- a/src/pnf_stub/pnf_stub_p7_msg_hdl.c +++ b/src/pnf_stub/pnf_stub_p7_msg_hdl.c @@ -38,9 +38,6 @@ #include "pnf_stub_p7_udp.h" #include "pnf_stub.h" -extern PnfGlobalCb pnfCb; -extern uint8_t NUM_SLOTS_PER_SUBFRAME; - /********************************************************************************* * @Brief: Filling of Ul Node Sync * diff --git a/src/pnf_stub/pnf_stub_p7_udp.c b/src/pnf_stub/pnf_stub_p7_udp.c index 0d2e727cb..b8c0ce23d 100644 --- a/src/pnf_stub/pnf_stub_p7_udp.c +++ b/src/pnf_stub/pnf_stub_p7_udp.c @@ -27,6 +27,7 @@ uint8_t sockType; uint8_t protType; +PnfP7UdpGlobalCb pnfP7Cb; /************************************************************************** * @brief Task Initiation callback function. diff --git a/src/pnf_stub/pnf_stub_p7_udp.h b/src/pnf_stub/pnf_stub_p7_udp.h index 69961e935..96ba951a8 100644 --- a/src/pnf_stub/pnf_stub_p7_udp.h +++ b/src/pnf_stub/pnf_stub_p7_udp.h @@ -37,7 +37,7 @@ typedef struct pnfP7UdpGlobalCb uint16_t gCntMsg; }PnfP7UdpGlobalCb; -PnfP7UdpGlobalCb pnfP7Cb; +extern PnfP7UdpGlobalCb pnfP7Cb; uint8_t pnfP7UdpActvInit(); uint8_t pnfP7UdpCfgReq();