Work around dlopen'ed objects not executing constructors on solaris platform.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2276 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Steven Dake 2009-06-21 05:02:09 +00:00
parent 32ff97b87b
commit cbb6aaf78b
8 changed files with 24 additions and 0 deletions

View File

@ -261,6 +261,9 @@ static int quorum_exec_init_fn (struct corosync_api_v1 *api)
int res;
void *quorum_iface_p;
#ifdef COROSYNC_SOLARIS
logsys_subsys_init();
#endif
corosync_api = api;
list_init (&lib_trackers_list);
list_init (&internal_trackers_list);

View File

@ -352,6 +352,10 @@ struct req_exec_cfg_shutdown {
static int cfg_exec_init_fn (
struct corosync_api_v1 *corosync_api_v1)
{
#ifdef COROSYNC_SOLARIS
logsys_subsys_init();
#endif
api = corosync_api_v1;
list_init(&trackers_list);

View File

@ -270,6 +270,9 @@ __attribute__ ((constructor)) static void corosync_lcr_component_register (void)
static int confdb_exec_init_fn (
struct corosync_api_v1 *corosync_api)
{
#ifdef COROSYNC_SOLARIS
logsys_subsys_init();
#endif
api = corosync_api;
return 0;
}

View File

@ -492,6 +492,9 @@ static int notify_lib_joinlist(
static int cpg_exec_init_fn (struct corosync_api_v1 *corosync_api)
{
#ifdef COROSYNC_SOLARIS
logsys_subsys_init();
#endif
api = corosync_api;
return (0);
}

View File

@ -204,6 +204,10 @@ __attribute__ ((constructor)) static void corosync_lcr_component_register (void)
static int evs_exec_init_fn (
struct corosync_api_v1 *corosync_api)
{
#ifdef COROSYNC_SOLARIS
logsys_subsys_init();
#endif
api = corosync_api;
return 0;

View File

@ -214,6 +214,9 @@ __attribute__ ((constructor)) static void corosync_lcr_component_register (void)
static int pload_exec_init_fn (
struct corosync_api_v1 *corosync_api)
{
#ifdef COROSYNC_SOLARIS
logsys_subsys_init();
#endif
api = corosync_api;
return 0;

View File

@ -99,6 +99,7 @@ static struct lcr_comp test_quorum_comp_ver0 = {
void corosync_lcr_component_register (void);
void corosync_lcr_component_register (void) {
logsys_subsys_init();
#else
__attribute__ ((constructor)) static void corosync_lcr_component_register (void) {
#endif

View File

@ -499,6 +499,9 @@ static int votequorum_exec_init_fn (struct corosync_api_v1 *api)
hdb_handle_t object_handle;
hdb_handle_t find_handle;
#ifdef COROSYNC_SOLARIS
logsys_subsys_init();
#endif
ENTER();
corosync_api = api;