diff --git a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c index 8366edeb50299592dbc854f1e82c4682c3018679..1c2dfb6903f018c8d18cf66e3f3403b9ffe0aff7 100644 --- a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c +++ b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c @@ -67,12 +67,12 @@ * overwritten when linking with the slurmctld. */ #if defined(__APPLE__) -slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); -List job_list __attribute__((weak_import)) = NULL; -uint16_t running_cache __attribute__((weak_import)) = 0; -pthread_mutex_t assoc_cache_mutex __attribute__((weak_import)); -pthread_cond_t assoc_cache_cond __attribute__((weak_import)); -int node_record_count __attribute__((weak_import); +extern slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); +extern List job_list __attribute__((weak_import)); +extern uint16_t running_cache __attribute__((weak_import)); +extern pthread_mutex_t assoc_cache_mutex __attribute__((weak_import)); +extern pthread_cond_t assoc_cache_cond __attribute__((weak_import)); +extern int node_record_count __attribute__((weak_import)); #else slurm_ctl_conf_t slurmctld_conf; List job_list = NULL; diff --git a/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c b/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c index 9010718ba8fa66bcec768dfaaad903d892d89666..3ec282c436253b67bbf2b71aeb5affae967f1cf5 100644 --- a/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c +++ b/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c @@ -75,7 +75,7 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurmd_conf_t *conf __attribute__((weak_import)) = NULL; +extern slurmd_conf_t *conf __attribute__((weak_import)); #else slurmd_conf_t *conf = NULL; #endif diff --git a/src/plugins/acct_gather_energy/xcc/acct_gather_energy_xcc.c b/src/plugins/acct_gather_energy/xcc/acct_gather_energy_xcc.c index f35fd7c9de6fc98b5ee6d1e0987525b7699b4041..888dbb788eb9bd7ea33e48f724d7f07c2128b4b7 100644 --- a/src/plugins/acct_gather_energy/xcc/acct_gather_energy_xcc.c +++ b/src/plugins/acct_gather_energy/xcc/acct_gather_energy_xcc.c @@ -64,7 +64,7 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurmd_conf_t *conf __attribute__((weak_import)) = NULL; +extenr slurmd_conf_t *conf __attribute__((weak_import)); #else slurmd_conf_t *conf = NULL; #endif diff --git a/src/plugins/burst_buffer/datawarp/burst_buffer_datawarp.c b/src/plugins/burst_buffer/datawarp/burst_buffer_datawarp.c index 5cad9323011e5e9d2321bc4db1cf1b782f33005d..194d72fd12a57c694bdbafedf0ef125b8d22a4b8 100644 --- a/src/plugins/burst_buffer/datawarp/burst_buffer_datawarp.c +++ b/src/plugins/burst_buffer/datawarp/burst_buffer_datawarp.c @@ -127,8 +127,8 @@ static char * state_save_loc = NULL; * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -int accounting_enforce __attribute__((weak_import)) = 0; -void *acct_db_conn __attribute__((weak_import)) = NULL; +extern int accounting_enforce __attribute__((weak_import)); +extern void *acct_db_conn __attribute__((weak_import)); #else int accounting_enforce = 0; void *acct_db_conn = NULL; diff --git a/src/plugins/job_submit/lua/job_submit_lua.c b/src/plugins/job_submit/lua/job_submit_lua.c index 1f23f5397ec6eed547630f00b83c1bf57280c761..c7aec4bb397b1e19f438a1d4a8a42d2067897291 100644 --- a/src/plugins/job_submit/lua/job_submit_lua.c +++ b/src/plugins/job_submit/lua/job_submit_lua.c @@ -113,8 +113,8 @@ static pthread_mutex_t lua_lock = PTHREAD_MUTEX_INITIALIZER; * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -int accounting_enforce __attribute__((weak_import)) = 0; -void *acct_db_conn __attribute__((weak_import)) = NULL; +extern int accounting_enforce __attribute__((weak_import)); +extern void *acct_db_conn __attribute__((weak_import)); #else int accounting_enforce = 0; void *acct_db_conn = NULL; diff --git a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c index 72d7c06c0f4096d04368d04a23ef714f1ad1f2c8..aaa0a95bc8dca1239c11a3a218beb49fe5c30659 100644 --- a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c +++ b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c @@ -59,7 +59,7 @@ * overwritten when linking with the slurmd. */ #if defined (__APPLE__) -slurmd_conf_t *conf __attribute__((weak_import)); +extern slurmd_conf_t *conf __attribute__((weak_import)); #else slurmd_conf_t *conf; #endif diff --git a/src/plugins/jobacct_gather/common/common_jag.c b/src/plugins/jobacct_gather/common/common_jag.c index f7c2b074de93c90a52c432f8908c4a2ee99daebc..4b49321beb0aad7bb9510b39be50d17cc8cbb9f3 100644 --- a/src/plugins/jobacct_gather/common/common_jag.c +++ b/src/plugins/jobacct_gather/common/common_jag.c @@ -62,8 +62,8 @@ * overwritten when linking with the slurmstepd. */ #if defined (__APPLE__) -uint32_t g_tres_count __attribute__((weak_import)); -char **assoc_mgr_tres_name_array __attribute__((weak_import)); +extern uint32_t g_tres_count __attribute__((weak_import)); +extern char **assoc_mgr_tres_name_array __attribute__((weak_import)); #else uint32_t g_tres_count; char **assoc_mgr_tres_name_array; diff --git a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c index 767737ee9db55420d7e66987e57294b8a8effa4d..a0a04e66ae9e53bfe5e48e874c05dce37a82d69b 100644 --- a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c +++ b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c @@ -113,8 +113,8 @@ const uint32_t plugin_version = SLURM_VERSION_NUMBER; * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -int accounting_enforce __attribute__((weak_import)) = 0; -void *acct_db_conn __attribute__((weak_import)) = NULL; +extern int accounting_enforce __attribute__((weak_import)); +extern void *acct_db_conn __attribute__((weak_import)); #else int accounting_enforce = 0; void *acct_db_conn = NULL; diff --git a/src/plugins/node_features/knl_cray/node_features_knl_cray.c b/src/plugins/node_features/knl_cray/node_features_knl_cray.c index b202ff2640c1b36d44a7b0465e2834f5a80a8d08..8b5cc14453f25a554c299dda0ed1761770481cb8 100644 --- a/src/plugins/node_features/knl_cray/node_features_knl_cray.c +++ b/src/plugins/node_features/knl_cray/node_features_knl_cray.c @@ -122,8 +122,8 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurmctld_config_t slurmctld_config __attribute__((weak_import)); -bitstr_t *avail_node_bitmap __attribute__((weak_import)); +extern slurmctld_config_t slurmctld_config __attribute__((weak_import)); +extern bitstr_t *avail_node_bitmap __attribute__((weak_import)); #else slurmctld_config_t slurmctld_config; bitstr_t *avail_node_bitmap; diff --git a/src/plugins/node_features/knl_generic/node_features_knl_generic.c b/src/plugins/node_features/knl_generic/node_features_knl_generic.c index ca40cd55d7a53fc23918b7e4939a5884bbc837dc..c02bb0036ed2ded8203ebe686feecbd497280a41 100644 --- a/src/plugins/node_features/knl_generic/node_features_knl_generic.c +++ b/src/plugins/node_features/knl_generic/node_features_knl_generic.c @@ -119,7 +119,7 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurmctld_config_t slurmctld_config __attribute__((weak_import)); +extern slurmctld_config_t slurmctld_config __attribute__((weak_import)); #else slurmctld_config_t slurmctld_config; #endif diff --git a/src/plugins/power/cray_aries/power_cray_aries.c b/src/plugins/power/cray_aries/power_cray_aries.c index 4c39262df1f2f188a006d25e0b38edde574888b1..0f89ad9e259810d55470cbbcbb79956ac32b2f13 100644 --- a/src/plugins/power/cray_aries/power_cray_aries.c +++ b/src/plugins/power/cray_aries/power_cray_aries.c @@ -78,9 +78,9 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -struct node_record *node_record_table_ptr __attribute__((weak_import)) = NULL; -List job_list __attribute__((weak_import)) = NULL; -int node_record_count __attribute__((weak_import)) = 0; +extern struct node_record *node_record_table_ptr __attribute__((weak_import)); +extern List job_list __attribute__((weak_import)); +extern int node_record_count __attribute__((weak_import)); #else struct node_record *node_record_table_ptr = NULL; List job_list = NULL; diff --git a/src/plugins/priority/basic/priority_basic.c b/src/plugins/priority/basic/priority_basic.c index be76d2df4ab4e30d88fb1235b205b81585366d60..beb0439aa0cde441cd06b66606e36df11a629e60 100644 --- a/src/plugins/priority/basic/priority_basic.c +++ b/src/plugins/priority/basic/priority_basic.c @@ -50,7 +50,7 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -int slurmctld_tres_cnt __attribute__((weak_import)) = 0; +extern int slurmctld_tres_cnt __attribute__((weak_import)); #else int slurmctld_tres_cnt = 0; #endif diff --git a/src/plugins/priority/multifactor/priority_multifactor.c b/src/plugins/priority/multifactor/priority_multifactor.c index 153b6a0ce914c55ba1646e3fb008ccec333c874a..5b589cdc5f9bd5d473cac7e632e8f94bc5436db6 100644 --- a/src/plugins/priority/multifactor/priority_multifactor.c +++ b/src/plugins/priority/multifactor/priority_multifactor.c @@ -80,14 +80,14 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -void *acct_db_conn __attribute__((weak_import)) = NULL; -uint32_t cluster_cpus __attribute__((weak_import)) = NO_VAL; -List job_list __attribute__((weak_import)) = NULL; -time_t last_job_update __attribute__((weak_import)) = (time_t) 0; -uint16_t part_max_priority __attribute__((weak_import)) = 0; -slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); -int slurmctld_tres_cnt __attribute__((weak_import)) = 0; -int accounting_enforce __attribute__((weak_import)) = 0; +extern void *acct_db_conn __attribute__((weak_import)); +extern uint32_t cluster_cpus __attribute__((weak_import)); +extern List job_list __attribute__((weak_import)); +extern time_t last_job_update __attribute__((weak_import)); +extern uint16_t part_max_priority __attribute__((weak_import)); +extern slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); +extern int slurmctld_tres_cnt __attribute__((weak_import)); +extern int accounting_enforce __attribute__((weak_import)); #else void *acct_db_conn = NULL; uint32_t cluster_cpus = NO_VAL; diff --git a/src/plugins/route/topology/route_topology.c b/src/plugins/route/topology/route_topology.c index 912ec94725793accd92e8c343654796c0b808fdd..21cb4ba884259b107096d3cd254c66ec35e994df 100644 --- a/src/plugins/route/topology/route_topology.c +++ b/src/plugins/route/topology/route_topology.c @@ -53,9 +53,9 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -struct switch_record *switch_record_table __attribute__((weak_import)) = NULL; -int switch_record_cnt __attribute__((weak_import)) = 0; -int switch_levels __attribute__((weak_import)) = 0; +extern struct switch_record *switch_record_table __attribute__((weak_import)); +extern int switch_record_cnt __attribute__((weak_import)); +extern int switch_levels __attribute__((weak_import)); #else struct switch_record *switch_record_table = NULL; int switch_record_cnt = 0; diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index 353e3540a3b0bbbdd2ac460e14da2a2a75d84e32..a2aa8595606a8b0b0137a3a4f9876465f1e16dfe 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -114,20 +114,20 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); -struct node_record *node_record_table_ptr __attribute__((weak_import)); -List part_list __attribute__((weak_import)); -List job_list __attribute__((weak_import)); -int node_record_count __attribute__((weak_import)); -time_t last_node_update __attribute__((weak_import)); -struct switch_record *switch_record_table __attribute__((weak_import)); -int switch_record_cnt __attribute__((weak_import)); -bitstr_t *avail_node_bitmap __attribute__((weak_import)); -bitstr_t *idle_node_bitmap __attribute__((weak_import)); -uint16_t *cr_node_num_cores __attribute__((weak_import)); -uint32_t *cr_node_cores_offset __attribute__((weak_import)); -int slurmctld_tres_cnt __attribute__((weak_import)) = 0; -slurmctld_config_t slurmctld_config __attribute__((weak_import)); +extern slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); +extern struct node_record *node_record_table_ptr __attribute__((weak_import)); +extern List part_list __attribute__((weak_import)); +extern List job_list __attribute__((weak_import)); +extern int node_record_count __attribute__((weak_import)); +extern time_t last_node_update __attribute__((weak_import)); +extern struct switch_record *switch_record_table __attribute__((weak_import)); +extern int switch_record_cnt __attribute__((weak_import)); +extern bitstr_t *avail_node_bitmap __attribute__((weak_import)); +extern bitstr_t *idle_node_bitmap __attribute__((weak_import)); +extern uint16_t *cr_node_num_cores __attribute__((weak_import)); +extern uint32_t *cr_node_cores_offset __attribute__((weak_import)); +extern int slurmctld_tres_cnt __attribute__((weak_import)); +extern slurmctld_config_t slurmctld_config __attribute__((weak_import)); #else slurm_ctl_conf_t slurmctld_conf; struct node_record *node_record_table_ptr; diff --git a/src/plugins/select/cons_tres/job_test.c b/src/plugins/select/cons_tres/job_test.c index caac40d9b6ddcbd03a6e017468704ba98e8dfe5c..cc8a7ee26075e9f894d656cc36a249bf013f2af9 100644 --- a/src/plugins/select/cons_tres/job_test.c +++ b/src/plugins/select/cons_tres/job_test.c @@ -47,8 +47,8 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurmctld_config_t slurmctld_config __attribute__((weak_import)); -struct node_record *node_record_table_ptr __attribute__((weak_import)); +extern slurmctld_config_t slurmctld_config __attribute__((weak_import)); +extern struct node_record *node_record_table_ptr __attribute__((weak_import)); #else slurmctld_config_t slurmctld_config; struct node_record *node_record_table_ptr; diff --git a/src/plugins/select/cons_tres/select_cons_tres.c b/src/plugins/select/cons_tres/select_cons_tres.c index d9aee482806f5b653df6676ed231a92a1f314c8a..6b39998ced2865d915eb6e3099c932d43af79b11 100644 --- a/src/plugins/select/cons_tres/select_cons_tres.c +++ b/src/plugins/select/cons_tres/select_cons_tres.c @@ -58,19 +58,19 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); -struct node_record *node_record_table_ptr __attribute__((weak_import)); -List part_list __attribute__((weak_import)); -List job_list __attribute__((weak_import)); -int node_record_count __attribute__((weak_import)); -time_t last_node_update __attribute__((weak_import)); -struct switch_record *switch_record_table __attribute__((weak_import)); -int switch_record_cnt __attribute__((weak_import)); -bitstr_t *avail_node_bitmap __attribute__((weak_import)); -bitstr_t *idle_node_bitmap __attribute__((weak_import)); -uint16_t *cr_node_num_cores __attribute__((weak_import)); -uint32_t *cr_node_cores_offset __attribute__((weak_import)); -int slurmctld_tres_cnt __attribute__((weak_import)) = 0; +extern slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); +extern struct node_record *node_record_table_ptr __attribute__((weak_import)); +extern List part_list __attribute__((weak_import)); +extern List job_list __attribute__((weak_import)); +extern int node_record_count __attribute__((weak_import)); +extern time_t last_node_update __attribute__((weak_import)); +extern struct switch_record *switch_record_table __attribute__((weak_import)); +extern int switch_record_cnt __attribute__((weak_import)); +extern bitstr_t *avail_node_bitmap __attribute__((weak_import)); +extern bitstr_t *idle_node_bitmap __attribute__((weak_import)); +extern uint16_t *cr_node_num_cores __attribute__((weak_import)); +extern uint32_t *cr_node_cores_offset __attribute__((weak_import)); +extern int slurmctld_tres_cnt __attribute__((weak_import)); #else slurm_ctl_conf_t slurmctld_conf; struct node_record *node_record_table_ptr; diff --git a/src/plugins/select/cray_aries/select_cray_aries.c b/src/plugins/select/cray_aries/select_cray_aries.c index 33b2893cf857b2fad90e44140e290c3861fb156d..321b7776d1c7f3525bdfca3c9ba8740894dacc60 100644 --- a/src/plugins/select/cray_aries/select_cray_aries.c +++ b/src/plugins/select/cray_aries/select_cray_aries.c @@ -122,15 +122,15 @@ typedef enum { * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurmctld_config_t slurmctld_config __attribute__((weak_import)); -slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); -slurmdb_cluster_rec_t *working_cluster_rec __attribute__((weak_import)) = NULL; -struct node_record *node_record_table_ptr __attribute__((weak_import)); -int node_record_count __attribute__((weak_import)); -time_t last_node_update __attribute__((weak_import)); -int slurmctld_primary __attribute__((weak_import)); -void *acct_db_conn __attribute__((weak_import)) = NULL; -bool ignore_state_errors __attribute__((weak_import)) = true; +extern slurmctld_config_t slurmctld_config __attribute__((weak_import)); +extern slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); +extern slurmdb_cluster_rec_t *working_cluster_rec __attribute__((weak_import)); +extern struct node_record *node_record_table_ptr __attribute__((weak_import)); +extern int node_record_count __attribute__((weak_import)); +extern time_t last_node_update __attribute__((weak_import)); +extern int slurmctld_primary __attribute__((weak_import)); +extern void *acct_db_conn __attribute__((weak_import)); +extern bool ignore_state_errors __attribute__((weak_import)) = true; #else slurmctld_config_t slurmctld_config; slurm_ctl_conf_t slurmctld_conf; diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index c66ba491a8aeabf8c4f40dcf644424c5648bf468..7d744d65d8f35e75b4694d85269685af9d06f6e9 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -86,20 +86,20 @@ * overwritten when linking with the slurmctld. */ #if defined (__APPLE__) -slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); -struct node_record *node_record_table_ptr __attribute__((weak_import)); -List part_list __attribute__((weak_import)); -List job_list __attribute__((weak_import)); -int node_record_count __attribute__((weak_import)); -time_t last_node_update __attribute__((weak_import)); -struct switch_record *switch_record_table __attribute__((weak_import)); -int switch_record_cnt __attribute__((weak_import)); -slurmctld_config_t slurmctld_config __attribute__((weak_import)); - -int hypercube_dimensions __attribute__((weak_import)); -struct hypercube_switch *hypercube_switch_table __attribute__((weak_import)); -int hypercube_switch_cnt __attribute__((weak_import)); -struct hypercube_switch ***hypercube_switches __attribute__((weak_import)); +extern slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); +extern struct node_record *node_record_table_ptr __attribute__((weak_import)); +extern List part_list __attribute__((weak_import)); +extern List job_list __attribute__((weak_import)); +extern int node_record_count __attribute__((weak_import)); +extern time_t last_node_update __attribute__((weak_import)); +extern struct switch_record *switch_record_table __attribute__((weak_import)); +extern int switch_record_cnt __attribute__((weak_import)); +extern slurmctld_config_t slurmctld_config __attribute__((weak_import)); + +extern int hypercube_dimensions __attribute__((weak_import)); +extern struct hypercube_switch *hypercube_switch_table __attribute__((weak_import)); +extern int hypercube_switch_cnt __attribute__((weak_import)); +extern struct hypercube_switch ***hypercube_switches __attribute__((weak_import)); #else slurm_ctl_conf_t slurmctld_conf;