aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch
blob: b581c571bb29ba216da0a40fbab6f0287bb2e3f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
From 9a46462f08535e946d97fd40c79229a7ee8b7336 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 17 Aug 2020 00:00:00 -0700
Subject: [PATCH] Fix build with -fno-common

Mark the declarations with extern where needed in header files

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/ckpt/agent/cpa_cb.h   |  2 +-
 src/ckpt/ckptd/cpd_init.h |  2 +-
 src/evt/agent/eda.h       |  2 +-
 src/evt/evtd/eds.h        |  2 +-
 src/evt/evtd/eds_amf.c    |  2 ++
 src/evt/evtd/eds_amf.h    |  2 +-
 src/evt/evtd/eds_cb.h     |  2 +-
 src/imm/immd/immd.h       |  2 +-
 src/lck/lckd/gld_dl_api.h |  4 ++--
 src/lck/lcknd/glnd_cb.h   |  4 ++--
 src/mds/mds_core.h        | 34 +++++++++++++++++++---------------
 src/mds/mds_dt_tcp.c      |  2 ++
 src/mds/mds_dt_tcp.h      |  2 +-
 src/mds/mds_main.c        |  2 +-
 src/msg/msgnd/mqnd_db.h   |  2 +-
 15 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/src/ckpt/agent/cpa_cb.h b/src/ckpt/agent/cpa_cb.h
index ac48c6c..d633583 100644
--- a/src/ckpt/agent/cpa_cb.h
+++ b/src/ckpt/agent/cpa_cb.h
@@ -119,7 +119,7 @@ typedef struct cpa_cb {
 
 } CPA_CB;
 
-uint32_t gl_cpa_hdl;
+extern uint32_t gl_cpa_hdl;
 
 typedef struct cpa_prcess_evt_sync {
   NCS_QELEM qelem;
diff --git a/src/ckpt/ckptd/cpd_init.h b/src/ckpt/ckptd/cpd_init.h
index 0c02642..cf3466b 100644
--- a/src/ckpt/ckptd/cpd_init.h
+++ b/src/ckpt/ckptd/cpd_init.h
@@ -33,7 +33,7 @@
 #include <saAmf.h>
 #include "cpd_cb.h"
 
-uint32_t gl_cpd_cb_hdl;
+extern uint32_t gl_cpd_cb_hdl;
 
 /* Macro to get the component name for the component type */
 #define m_CPD_TASKNAME "CPD"
diff --git a/src/evt/agent/eda.h b/src/evt/agent/eda.h
index 4d1991c..138c910 100644
--- a/src/evt/agent/eda.h
+++ b/src/evt/agent/eda.h
@@ -39,7 +39,7 @@
 #include "base/logtrace.h"
 
 /* EDA CB global handle declaration */
-uint32_t gl_eda_hdl;
+extern uint32_t gl_eda_hdl;
 
 /* EDA Default MDS timeout value */
 #define EDA_MDS_DEF_TIMEOUT 100
diff --git a/src/evt/evtd/eds.h b/src/evt/evtd/eds.h
index bc9c429..3545d77 100644
--- a/src/evt/evtd/eds.h
+++ b/src/evt/evtd/eds.h
@@ -72,6 +72,6 @@
 #include "base/daemon.h"
 
 /* EDS CB global handle declaration */
-uint32_t gl_eds_hdl;
+extern uint32_t gl_eds_hdl;
 
 #endif  // EVT_EVTD_EDS_H_
diff --git a/src/evt/evtd/eds_amf.c b/src/evt/evtd/eds_amf.c
index 97b71a5..adebf0c 100644
--- a/src/evt/evtd/eds_amf.c
+++ b/src/evt/evtd/eds_amf.c
@@ -30,6 +30,8 @@ stuff.
 #include "eds.h"
 #include "eds_dl_api.h"
 
+struct next_HAState nextStateInfo;
+
 /* HA AMF statemachine & State handler definitions */
 
 /****************************************************************************
diff --git a/src/evt/evtd/eds_amf.h b/src/evt/evtd/eds_amf.h
index e9aeaa6..f9803b4 100644
--- a/src/evt/evtd/eds_amf.h
+++ b/src/evt/evtd/eds_amf.h
@@ -49,7 +49,7 @@ uint32_t eds_quiesced_state_handler(EDS_CB *cb, SaInvocationT invocation);
 struct next_HAState {
   uint8_t nextState1;
   uint8_t nextState2;
-} nextStateInfo; /* AMF HA state can transit to a maximum of the two defined
+}; /* AMF HA state can transit to a maximum of the two defined
                     states */
 
 #define VALIDATE_STATE(curr, next)                  \
diff --git a/src/evt/evtd/eds_cb.h b/src/evt/evtd/eds_cb.h
index c127ead..19c48cd 100644
--- a/src/evt/evtd/eds_cb.h
+++ b/src/evt/evtd/eds_cb.h
@@ -40,7 +40,7 @@
 #include "base/ncssysf_tmr.h"
 
 /* global variables */
-uint32_t gl_eds_hdl;
+extern uint32_t gl_eds_hdl;
 
 struct eda_reg_list_tag;
 
diff --git a/src/imm/immd/immd.h b/src/imm/immd/immd.h
index 7dc1da6..bab3945 100644
--- a/src/imm/immd/immd.h
+++ b/src/imm/immd/immd.h
@@ -42,7 +42,7 @@
 #include "immd_sbedu.h"
 #include "base/ncs_mda_pvt.h"
 
-IMMD_CB *immd_cb;
+extern IMMD_CB *immd_cb;
 
 extern uint32_t initialize_for_assignment(IMMD_CB *cb, SaAmfHAStateT ha_state);
 
diff --git a/src/lck/lckd/gld_dl_api.h b/src/lck/lckd/gld_dl_api.h
index 6476a71..3a67fd1 100644
--- a/src/lck/lckd/gld_dl_api.h
+++ b/src/lck/lckd/gld_dl_api.h
@@ -33,7 +33,7 @@
 #include "base/ncsgl_defs.h"
 #include "base/ncs_lib.h"
 
-uint32_t gl_gld_hdl;
-uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info);
+extern uint32_t gl_gld_hdl;
+extern uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info);
 
 #endif  // LCK_LCKD_GLD_DL_API_H_
diff --git a/src/lck/lcknd/glnd_cb.h b/src/lck/lcknd/glnd_cb.h
index 3b82f60..77a1f88 100644
--- a/src/lck/lcknd/glnd_cb.h
+++ b/src/lck/lcknd/glnd_cb.h
@@ -28,8 +28,8 @@ extern "C" {
 #endif
 
 /* global variables */
-uint32_t gl_glnd_hdl;
-NCSCONTEXT gl_glnd_task_hdl;
+extern uint32_t gl_glnd_hdl;
+extern NCSCONTEXT gl_glnd_task_hdl;
 
 /* macros for the global varibales */
 #define m_GLND_RETRIEVE_GLND_CB_HDL gl_glnd_hdl
diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h
index dad62cd..ed69d3a 100644
--- a/src/mds/mds_core.h
+++ b/src/mds/mds_core.h
@@ -26,6 +26,10 @@
 #ifndef MDS_MDS_CORE_H_
 #define MDS_MDS_CORE_H_
 
+#ifndef EXTERN
+#define EXTERN extern
+#endif
+
 #include <pthread.h>
 #include "base/ncsgl_defs.h"
 #include "mds/mds_papi.h"
@@ -600,65 +604,65 @@ extern "C" {
 /* ******************************************** */
 
 /* Initialization of MDTM Module */
-uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref);
+EXTERN uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref);
 
 /* Destroying the MDTM Module*/
-uint32_t (*mds_mdtm_destroy)(void);
+EXTERN uint32_t (*mds_mdtm_destroy)(void);
 
-uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req);
+EXTERN uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req);
 
 /* SVC Install */
-uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+EXTERN uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
                                  NCSMDS_SCOPE_TYPE install_scope,
                                  V_DEST_RL role, MDS_VDEST_ID vdest_id,
                                  NCS_VDEST_TYPE vdest_policy,
                                  MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver);
 
 /* SVC Uninstall */
-uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+EXTERN uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
                                    NCSMDS_SCOPE_TYPE install_scope,
                                    V_DEST_RL role, MDS_VDEST_ID vdest_id,
                                    NCS_VDEST_TYPE vdest_policy,
                                    MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver);
 
 /* SVC Subscribe */
-uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+EXTERN uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
                                    NCSMDS_SCOPE_TYPE subscribe_scope,
                                    MDS_SVC_HDL local_svc_hdl,
                                    MDS_SUBTN_REF_VAL *subtn_ref_val);
 
 /*  added svc_hdl */
 /* SVC Unsubscribe */
-uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
+EXTERN uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id,
                                      NCSMDS_SCOPE_TYPE subscribe_scope,
                                      MDS_SUBTN_REF_VAL subtn_ref_val);
 
 /* VDEST Install */
-uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id);
+EXTERN uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id);
 
 /* VDEST Uninstall */
-uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id);
+EXTERN uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id);
 
 /* VDEST Subscribe */
-uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id,
+EXTERN uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id,
                                      MDS_SUBTN_REF_VAL *subtn_ref_val);
 
 /* VDEST Unsubscribe */
-uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id,
+EXTERN uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id,
                                        MDS_SUBTN_REF_VAL subtn_ref_val);
 
 /* Tx Register (For incrementing the use count) */
-uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest);
+EXTERN uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest);
 
 /* Tx Unregister (For decrementing the use count) */
-uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest);
+EXTERN uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest);
 
 /* Node subscription */
-uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl,
+EXTERN uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl,
                                     MDS_SUBTN_REF_VAL *subtn_ref_val);
 
 /* Node unsubscription */
-uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val);
+EXTERN uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val);
 
 #ifdef __cplusplus
 }
diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c
index 4a37246..e73cef4 100644
--- a/src/mds/mds_dt_tcp.c
+++ b/src/mds/mds_dt_tcp.c
@@ -70,6 +70,8 @@ NCS_PATRICIA_TREE mdtm_reassembly_list;
 
 /* Get the pid of the process */
 pid_t mdtm_pid;
+  
+MDTM_TCP_CB *tcp_cb;
 
 static void mds_mdtm_enc_init(MDS_MDTM_DTM_MSG *init, uint8_t *buff);
 static uint32_t mdtm_create_rcv_task(void);
diff --git a/src/mds/mds_dt_tcp.h b/src/mds/mds_dt_tcp.h
index 1065464..350d534 100644
--- a/src/mds/mds_dt_tcp.h
+++ b/src/mds/mds_dt_tcp.h
@@ -50,7 +50,7 @@ typedef struct mdtm_tcp_cb {
 
 } MDTM_TCP_CB;
 
-MDTM_TCP_CB *tcp_cb;
+extern MDTM_TCP_CB *tcp_cb;
 
 typedef enum mds_mdtm_dtm_msg_types {
   MDS_MDTM_DTM_PID_TYPE = 1,
diff --git a/src/mds/mds_main.c b/src/mds/mds_main.c
index 0bcb2f9..5671ed3 100644
--- a/src/mds/mds_main.c
+++ b/src/mds/mds_main.c
@@ -20,7 +20,7 @@
 #endif
 
 #include "osaf/configmake.h"
-
+#define EXTERN
 /*****************************************************************************
 ..............................................................................
 
diff --git a/src/msg/msgnd/mqnd_db.h b/src/msg/msgnd/mqnd_db.h
index b78024e..fee43e5 100644
--- a/src/msg/msgnd/mqnd_db.h
+++ b/src/msg/msgnd/mqnd_db.h
@@ -33,7 +33,7 @@
 #include <saClm.h>
 #include <saImmOi.h>
 /* Decleration for global variable */
-uint32_t gl_mqnd_cb_hdl;
+extern uint32_t gl_mqnd_cb_hdl;
 
 /* Macros for reading global database */
 #define m_MQND_STORE_HDL(hdl) (gl_mqnd_cb_hdl = (hdl))
-- 
2.28.0