added my Recipes
This commit is contained in:
@@ -0,0 +1,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
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 90f81c1fb3e560cfc99ee7ab9a48a1736e3929cd Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 15 Nov 2020 13:22:31 -0800
|
||||
Subject: [PATCH] Use correct printf format for __fsblkcnt_t
|
||||
|
||||
This depends on time_t size and on some 32bit architectures e.g. riscv32
|
||||
this would be a 64bit value
|
||||
|
||||
Fixes
|
||||
os_defs.c:920:40: error: format '%ld' expects argument of type 'long int', but argument 3 has type '__fsblkcnt_t' {aka 'long long unsigned int'} [-Werror=format=]
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/base/os_defs.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/src/base/os_defs.c
|
||||
+++ b/src/base/os_defs.c
|
||||
@@ -917,7 +917,11 @@ uint32_t ncs_os_posix_shm(NCS_OS_POSIX_S
|
||||
((statsvfs.f_bfree - 1) * statsvfs.f_frsize)) {
|
||||
syslog(
|
||||
LOG_ERR,
|
||||
+#if (_FILE_OFFSET_BITS == 64 || __TIMESIZE == 64) && __WORDSIZE == 32
|
||||
+ "Insufficient shared memory (%lld) to write the data of size: %" PRId64
|
||||
+#else
|
||||
"Insufficient shared memory (%ld) to write the data of size: %" PRId64
|
||||
+#endif
|
||||
"\n",
|
||||
(statsvfs.f_bfree * statsvfs.f_frsize),
|
||||
req->info.write.i_write_size);
|
||||
@@ -0,0 +1,125 @@
|
||||
From c2668f7f2ea82a61115b7cae56ed081b41ff5153 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 22 Apr 2017 12:34:37 -0700
|
||||
Subject: [PATCH] configure: Disable format-overflow if supported by gcc
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
Makefile.am | 6 +--
|
||||
configure.ac | 2 +
|
||||
m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 79 insertions(+), 3 deletions(-)
|
||||
create mode 100644 m4/ax_check_compile_flag.m4
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index b3d6553..5607fc2 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -52,10 +52,10 @@ AM_CPPFLAGS = \
|
||||
-pthread \
|
||||
-D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \
|
||||
$(CORE_INCLUDES) \
|
||||
- $(all_includes)
|
||||
+ $(all_includes) @NOWARNINGS@
|
||||
|
||||
-AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
|
||||
-AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
|
||||
+AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
|
||||
+AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
|
||||
|
||||
if ENABLE_GCOV
|
||||
AM_CFLAGS += --coverage
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5b86730..47d1002 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -600,6 +600,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
|
||||
fi
|
||||
AC_SUBST(OSAF_HARDEN_FLAGS)
|
||||
|
||||
+AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow])
|
||||
+AC_SUBST(NOWARNINGS)
|
||||
#############################################
|
||||
# List the output Makefiles
|
||||
#############################################
|
||||
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
|
||||
new file mode 100644
|
||||
index 0000000..dcabb92
|
||||
--- /dev/null
|
||||
+++ b/m4/ax_check_compile_flag.m4
|
||||
@@ -0,0 +1,74 @@
|
||||
+# ===========================================================================
|
||||
+# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
||||
+# ===========================================================================
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# Check whether the given FLAG works with the current language's compiler
|
||||
+# or gives an error. (Warnings, however, are ignored)
|
||||
+#
|
||||
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
+# success/failure.
|
||||
+#
|
||||
+# If EXTRA-FLAGS is defined, it is added to the current language's default
|
||||
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
||||
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
||||
+# force the compiler to issue an error when a bad flag is given.
|
||||
+#
|
||||
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
||||
+#
|
||||
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
||||
+#
|
||||
+# LICENSE
|
||||
+#
|
||||
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
+#
|
||||
+# This program is free software: you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU General Public License as published by the
|
||||
+# Free Software Foundation, either version 3 of the License, or (at your
|
||||
+# option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
+# Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License along
|
||||
+# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
+#
|
||||
+# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
+# gives unlimited permission to copy, distribute and modify the configure
|
||||
+# scripts that are the output of Autoconf when processing the Macro. You
|
||||
+# need not follow the terms of the GNU General Public License when using
|
||||
+# or distributing such scripts, even though portions of the text of the
|
||||
+# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
+# all other use of the material that constitutes the Autoconf Macro.
|
||||
+#
|
||||
+# This special exception to the GPL applies to versions of the Autoconf
|
||||
+# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
+# modified version of the Autoconf Macro, you may extend this special
|
||||
+# exception to the GPL to apply to your modified version as well.
|
||||
+
|
||||
+#serial 5
|
||||
+
|
||||
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
||||
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
||||
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
||||
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
||||
+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
+ [AS_VAR_SET(CACHEVAR,[yes])],
|
||||
+ [AS_VAR_SET(CACHEVAR,[no])])
|
||||
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
||||
+AS_VAR_IF(CACHEVAR,yes,
|
||||
+ [m4_default([$2], :)],
|
||||
+ [m4_default([$3], :)])
|
||||
+AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
+])dnl AX_CHECK_COMPILE_FLAGS
|
||||
@@ -0,0 +1,27 @@
|
||||
From 979b2b6a1aa574a26e8b736049c4207d568f60f3 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 13 Apr 2017 17:39:07 -0700
|
||||
Subject: [PATCH] configure: Pass linker specific options with -Wl
|
||||
|
||||
This helps make it pass the options to linker correctly
|
||||
and we can use non-gcc compilers
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 12a5d5c..5b86730 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -596,7 +596,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
|
||||
if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then
|
||||
OSAF_HARDEN_FLAGS=""
|
||||
fi
|
||||
- OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -zrelro -znow"
|
||||
+ OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -Wl,-z,relro,-z,now"
|
||||
fi
|
||||
AC_SUBST(OSAF_HARDEN_FLAGS)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From 300fd3e27e71a91fc52d3f985ed4fde548852853 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 27 Sep 2019 12:50:11 -0700
|
||||
Subject: [PATCH] create_empty_library: Use CC variable intead of hardcoding
|
||||
gcc
|
||||
|
||||
This ensures that cross-compiles can succeed, otherwise we get wrong
|
||||
architecture on these stub libraries
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
scripts/create_empty_library | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/scripts/create_empty_library
|
||||
+++ b/scripts/create_empty_library
|
||||
@@ -66,4 +66,4 @@ for s in $symbols; do
|
||||
echo "SaAisErrorT $s() { return SA_AIS_ERR_UNAVAILABLE; }" >> "$tmpdir/lib.c"
|
||||
done
|
||||
rm -f "$1"
|
||||
-gcc -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1"
|
||||
+$CC -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" $LDFLAGS
|
||||
@@ -0,0 +1,50 @@
|
||||
From ffc829603a2c50674c8e04de5221e43f80bfc1b2 Mon Sep 17 00:00:00 2001
|
||||
From: Andrey Zhizhikin <andrey.z@gmail.com>
|
||||
Date: Mon, 27 Jan 2020 13:00:53 +0000
|
||||
Subject: [PATCH] immom_python: convert to python3
|
||||
|
||||
Convert immom_python to use python3, python2 is EOL and is not supported
|
||||
by all distributions anymore.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
|
||||
---
|
||||
samples/immsv/immom_python/immom.py | 2 +-
|
||||
samples/immsv/immom_python/immomexamples.py | 2 +-
|
||||
samples/immsv/immom_python/immomtest.py | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/samples/immsv/immom_python/immom.py b/samples/immsv/immom_python/immom.py
|
||||
index 4f68625ed..f88197000 100755
|
||||
--- a/samples/immsv/immom_python/immom.py
|
||||
+++ b/samples/immsv/immom_python/immom.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
immom -- An IMM Object Manager in Python
|
||||
|
||||
diff --git a/samples/immsv/immom_python/immomexamples.py b/samples/immsv/immom_python/immomexamples.py
|
||||
index 70c579265..bd693c25f 100755
|
||||
--- a/samples/immsv/immom_python/immomexamples.py
|
||||
+++ b/samples/immsv/immom_python/immomexamples.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
import immom
|
||||
|
||||
diff --git a/samples/immsv/immom_python/immomtest.py b/samples/immsv/immom_python/immomtest.py
|
||||
index 4b98bea8c..ed2463ba9 100755
|
||||
--- a/samples/immsv/immom_python/immomtest.py
|
||||
+++ b/samples/immsv/immom_python/immomtest.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import immom
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From c21f77d592415f316138c05f581192a1f061e735 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 15 Sep 2017 10:09:03 -0700
|
||||
Subject: [PATCH] immpbe_dump.cc: Use sys/wait.h instead of wait.h
|
||||
|
||||
Fixes
|
||||
redirecting incorrect #include <wait.h> to <sys/wait.h>
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
src/imm/common/immpbe_dump.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/imm/common/immpbe_dump.cc b/src/imm/common/immpbe_dump.cc
|
||||
index e6b3cc5..3956028 100644
|
||||
--- a/src/imm/common/immpbe_dump.cc
|
||||
+++ b/src/imm/common/immpbe_dump.cc
|
||||
@@ -26,12 +26,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
-#include <wait.h>
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdint.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/wait.h>
|
||||
#include <libgen.h>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 6168d43ddd353b92ad8bcd5c49dc68f18caa8a00 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 12 Apr 2022 17:07:49 -0700
|
||||
Subject: [PATCH 1/2] include missing <array> header
|
||||
|
||||
Fixes
|
||||
src/osaf/consensus/key_value.cc:25:30: error: aggregate 'std::array<char, 128> buffer' has incomplete type and cannot be defined
|
||||
25 | std::array<char, buf_size> buffer;
|
||||
| ^~~~~~
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/osaf/consensus/key_value.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/osaf/consensus/key_value.cc b/src/osaf/consensus/key_value.cc
|
||||
index 692dd3f..6e16cbf 100644
|
||||
--- a/src/osaf/consensus/key_value.cc
|
||||
+++ b/src/osaf/consensus/key_value.cc
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "base/getenv.h"
|
||||
#include "base/logtrace.h"
|
||||
#include "osaf/consensus/consensus.h"
|
||||
-
|
||||
+#include <array>
|
||||
int KeyValue::Execute(const std::string& command, std::string& output) {
|
||||
TRACE_ENTER();
|
||||
constexpr size_t buf_size = 128;
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
From 7fb393c66df33110fef0cbabac7d304f12eb82e4 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 15 Sep 2017 09:39:40 -0700
|
||||
Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX
|
||||
|
||||
Use _GNU_SOURCE instead of libc internal __USE_GNU
|
||||
Do not use the deprecated headers under include/sys
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
src/base/os_defs.h | 5 +++--
|
||||
src/mds/mds_dt_tcp.c | 1 -
|
||||
src/mds/mds_dt_tcp_disc.h | 2 +-
|
||||
src/mds/mds_dt_tipc.c | 1 -
|
||||
src/mds/mds_dt_tipc.h | 2 +-
|
||||
src/mds/mds_dt_trans.c | 1 -
|
||||
src/ntf/ntfd/NtfLogger.cc | 2 +-
|
||||
7 files changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/base/os_defs.h b/src/base/os_defs.h
|
||||
index a570c43..3559b19 100644
|
||||
--- a/src/base/os_defs.h
|
||||
+++ b/src/base/os_defs.h
|
||||
@@ -47,17 +47,18 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/msg.h> /* Added for message-queues : PM : 28/10/03 */
|
||||
#include <syslog.h>
|
||||
-#ifndef __USE_GNU
|
||||
+#include <limits.h>
|
||||
+#ifndef _GNU_SOURCE
|
||||
struct msgbuf {
|
||||
long int mtype;
|
||||
char mtext[1];
|
||||
};
|
||||
#endif /* else defined in <sys/msg.h> */
|
||||
#include <sys/time.h>
|
||||
-#include <sys/fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
+#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
|
||||
diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c
|
||||
index 1407eb1..a87c22f 100644
|
||||
--- a/src/mds/mds_dt_tcp.c
|
||||
+++ b/src/mds/mds_dt_tcp.c
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sched.h>
|
||||
-#include <sys/poll.h>
|
||||
#include <poll.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h
|
||||
index a6249d7..574f526 100644
|
||||
--- a/src/mds/mds_dt_tcp_disc.h
|
||||
+++ b/src/mds/mds_dt_tcp_disc.h
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "base/ncssysf_tsk.h"
|
||||
#include "base/ncssysf_mem.h"
|
||||
#include "mds_dt_tcp_disc.h"
|
||||
-#include "sys/poll.h"
|
||||
+#include <poll.h>
|
||||
|
||||
/* mds_indentifire + mds_version + msg_type + scope_type + server_type +
|
||||
server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val +
|
||||
diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c
|
||||
index 7714175..a0ed3b6 100644
|
||||
--- a/src/mds/mds_dt_tipc.c
|
||||
+++ b/src/mds/mds_dt_tipc.c
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <sched.h>
|
||||
-#include <sys/poll.h>
|
||||
#include <poll.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h
|
||||
index e73a11b..401d208 100644
|
||||
--- a/src/mds/mds_dt_tipc.h
|
||||
+++ b/src/mds/mds_dt_tipc.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c
|
||||
index 6f621e0..5aacbd3 100644
|
||||
--- a/src/mds/mds_dt_trans.c
|
||||
+++ b/src/mds/mds_dt_trans.c
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "mds_core.h"
|
||||
#include "base/osaf_utility.h"
|
||||
|
||||
-#include <sys/poll.h>
|
||||
#include <poll.h>
|
||||
|
||||
#define MDS_PROT_TCP 0xA0
|
||||
diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc
|
||||
index fd17c58..1120008 100644
|
||||
--- a/src/ntf/ntfd/NtfLogger.cc
|
||||
+++ b/src/ntf/ntfd/NtfLogger.cc
|
||||
@@ -20,7 +20,7 @@
|
||||
* INCLUDE FILES
|
||||
* ========================================================================
|
||||
*/
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
|
||||
#include "base/osaf_utility.h"
|
||||
#include <saAis.h>
|
||||
@@ -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);
|
||||
@@ -0,0 +1,28 @@
|
||||
From fe654d5340d18f04e4689ba19f843554909a0c00 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 12 Apr 2022 17:16:37 -0700
|
||||
Subject: [PATCH 2/2] configure: Disable selected warnings
|
||||
|
||||
These warnings are emitted when compiling with gcc 11 and gcc 12
|
||||
Do not treat them as errors
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure.ac | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -601,7 +601,10 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
|
||||
fi
|
||||
AC_SUBST(OSAF_HARDEN_FLAGS)
|
||||
|
||||
-AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow])
|
||||
+AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS='-Wno-error=format-overflow'])
|
||||
+AX_CHECK_COMPILE_FLAG([-Wuse-after-free],[NOWARNINGS+=' -Wno-error=use-after-free'])
|
||||
+AX_CHECK_COMPILE_FLAG([-Wstringop-truncation],[NOWARNINGS+=' -Wno-error=stringop-truncation'])
|
||||
+AX_CHECK_COMPILE_FLAG([-Warray-bounds],[NOWARNINGS+=' -Wno-error=array-bounds'])
|
||||
AC_SUBST(NOWARNINGS)
|
||||
#############################################
|
||||
# List the output Makefiles
|
||||
@@ -0,0 +1,99 @@
|
||||
SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
|
||||
DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
|
||||
middleware consistent with Service Availability Forum (SA Forum) \
|
||||
specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
|
||||
established by leading Communications and Enterprise Computing Companies to \
|
||||
facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
|
||||
code base in commercial products. \
|
||||
The OpenSAF project was launched in mid 2007 and has been under development by \
|
||||
an informal group of supporters of the OpenSAF initiative. The OpenSAF \
|
||||
Foundation was founded on January 22nd 2008 with Emerson Network Power, \
|
||||
Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
|
||||
HOMEPAGE = "http://www.opensaf.org"
|
||||
SECTION = "admin"
|
||||
LICENSE = "LGPL-2.1-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
|
||||
|
||||
DEPENDS = "libxml2 python3"
|
||||
TOOLCHAIN = "gcc"
|
||||
|
||||
SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
|
||||
file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
|
||||
file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
|
||||
file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
|
||||
file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
|
||||
file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
|
||||
file://0001-immom_python-convert-to-python3.patch \
|
||||
file://0001-Fix-build-with-fno-common.patch \
|
||||
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"
|
||||
|
||||
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases"
|
||||
|
||||
inherit autotools useradd systemd pkgconfig
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM:${PN} = "-f -r opensaf"
|
||||
USERADD_PARAM:${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} += "opensafd.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
|
||||
PACKAGECONFIG[systemd] = ",,systemd"
|
||||
PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi"
|
||||
PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi"
|
||||
|
||||
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
|
||||
|
||||
CPPFLAGS += "-Wno-error"
|
||||
CXXFLAGS += "-Wno-error"
|
||||
LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
|
||||
|
||||
do_install:append() {
|
||||
rm -fr "${D}${localstatedir}/lock"
|
||||
rm -fr "${D}${localstatedir}/run"
|
||||
rmdir "${D}${localstatedir}/log/${BPN}/saflog"
|
||||
rmdir "${D}${localstatedir}/log/${BPN}"
|
||||
rmdir "${D}${localstatedir}/log"
|
||||
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
|
||||
rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
|
||||
|
||||
# Rename /etc/init.d/opensafd to /usr/lib/opensaf/opensafd-init as it is
|
||||
# needed by opensafd.service, but /etc/init.d is removed by systemd.bbclass
|
||||
# if sysvinit is not in DISTRO_FEATURES.
|
||||
mv ${D}${sysconfdir}/init.d/opensafd ${D}${libdir}/${BPN}/opensafd-init
|
||||
ln -srf ${D}${libdir}/${BPN}/opensafd-init ${D}${sysconfdir}/init.d/opensafd
|
||||
[ ! -f ${D}${systemd_system_unitdir}/opensafd.service ] ||
|
||||
sed -ri -e "s|/etc/init.d/opensafd|${libdir}/${BPN}/opensafd-init|" ${D}${systemd_system_unitdir}/opensafd.service
|
||||
|
||||
# Create /var/log/opensaf/saflog in runtime.
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
|
||||
install -d ${D}${nonarch_libdir}/tmpfiles.d
|
||||
echo "d ${localstatedir}/log/${BPN}/saflog - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
|
||||
fi
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
echo "d root root 0755 ${localstatedir}/log/${BPN}/saflog none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
|
||||
fi
|
||||
}
|
||||
|
||||
FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
|
||||
FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
|
||||
FILES:${PN}-dev += "${libdir}/libopensaf_core.so"
|
||||
FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a"
|
||||
|
||||
INSANE_SKIP:${PN} = "dev-so"
|
||||
|
||||
RDEPENDS:${PN} += "bash python3-core"
|
||||
|
||||
# http://errors.yoctoproject.org/Errors/Details/186970/
|
||||
COMPATIBLE_HOST:libc-musl = 'null'
|
||||
|
||||
FILES_SOLIBSDEV = ""
|
||||
Reference in New Issue
Block a user