opensaf: Fix build with gcc13

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2023-01-25 22:06:05 -08:00
parent e552836284
commit 8284a018f3
3 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From 225891675b80beaa9d74ce56809e52c4451df72c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 25 Jan 2023 21:46:22 -0800
Subject: [PATCH 1/2] include cstdint for uintXX_t types
GCC-13 needs it [1]
[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/imm/immnd/ImmModel.h | 1 +
src/osaf/consensus/consensus_env.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h
index 44da470..0660431 100644
--- a/src/imm/immnd/ImmModel.h
+++ b/src/imm/immnd/ImmModel.h
@@ -22,6 +22,7 @@
#include <saImmOm.h>
#include <cstdarg>
#include <sys/types.h>
+#include <cstdint>
#include <string>
#include <vector>
#include <map>
diff --git a/src/osaf/consensus/consensus_env.h b/src/osaf/consensus/consensus_env.h
index df4f93a..89ccf46 100644
--- a/src/osaf/consensus/consensus_env.h
+++ b/src/osaf/consensus/consensus_env.h
@@ -15,6 +15,7 @@
#ifndef OSAF_CONSENSUS_CONSENSUS_ENV_H_
#define OSAF_CONSENSUS_CONSENSUS_ENV_H_
+#include <cstdint>
#include <string>
#include "base/mutex.h"
--
2.39.1

View File

@ -0,0 +1,59 @@
From 5e5686de677c884d5d785254412ced3c9d2d1b08 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 25 Jan 2023 21:47:45 -0800
Subject: [PATCH 2/2] Fix -Werror=enum-int-mismatch with gcc13
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/evt/agent/eda_hdl.h | 5 +++--
src/evt/evtd/eds_mds.h | 3 +--
src/smf/smfnd/smfnd.h | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
--- a/src/evt/agent/eda_hdl.h
+++ b/src/evt/agent/eda_hdl.h
@@ -31,6 +31,7 @@
#define EVT_AGENT_EDA_HDL_H_
#include "evt/agent/eda.h"
+#include "ais/include/saAis.h"
uint32_t eda_hdl_cbk_dispatch(EDA_CB *, EDA_CLIENT_HDL_REC *, SaDispatchFlagsT);
@@ -68,11 +69,11 @@ EDA_CHANNEL_HDL_REC *eda_find_chan_hdl_r
void eda_msg_destroy(EDSV_MSG *msg);
-uint32_t eda_extract_pattern_from_event(
+SaAisErrorT eda_extract_pattern_from_event(
SaEvtEventPatternArrayT *from_pattern_array,
SaEvtEventPatternArrayT **to_pattern_array);
-uint32_t eda_allocate_and_extract_pattern_from_event(
+SaAisErrorT eda_allocate_and_extract_pattern_from_event(
SaEvtEventPatternArrayT *from_pattern_array,
SaEvtEventPatternArrayT **to_pattern_array);
--- a/src/evt/evtd/eds_mds.h
+++ b/src/evt/evtd/eds_mds.h
@@ -49,8 +49,7 @@ uint32_t eds_mds_msg_send(EDS_CB *cb, ED
MDS_SEND_PRIORITY_TYPE prio);
uint32_t eds_mds_ack_send(EDS_CB *cb, EDSV_MSG *msg, MDS_DEST dest,
- SaTimeT timeout, MDS_SEND_PRIORITY_TYPE prio);
-
+ SaTimeT timeout, uint32_t prio);
uint32_t eds_dec_subscribe_msg(NCS_UBAID *uba, long msg_hdl, uint8_t ckpt_flag);
uint32_t eds_dec_publish_msg(NCS_UBAID *uba, long msg_hdl, uint8_t ckpt_flag);
--- a/src/smf/smfnd/smfnd.h
+++ b/src/smf/smfnd/smfnd.h
@@ -76,7 +76,7 @@ extern "C" {
#endif
/* smfnd_amf.c */
-extern uint32_t smfnd_amf_init(smfnd_cb_t *cb);
+extern SaAisErrorT smfnd_amf_init(smfnd_cb_t *cb);
/* smfnd_mds.c */
extern uint32_t smfnd_mds_init(smfnd_cb_t *cb);

View File

@ -30,6 +30,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \
file://0001-include-missing-array-header.patch \
file://0002-configure-Disable-selected-warnings.patch \
file://0001-include-cstdint-for-uintXX_t-types.patch \
file://0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch \
"
SRC_URI[sha256sum] = "f008d53c83087ce2014c6089bc4ef08e14c1b4091298b943f4ceade1aa6bf61e"