From ba8da59d13bbc53b5eff6f77285b0548b31b3200 Mon Sep 17 00:00:00 2001
From: Tim Wickberg <tim@schedmd.com>
Date: Mon, 29 Apr 2019 16:51:52 -0600
Subject: [PATCH] Collapse symbol blocks together, and mark extern for macOS.

---
 .../node_features/knl_cray/node_features_knl_cray.c  | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

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 8b5cc14453f..b97f7b71054 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
@@ -124,9 +124,11 @@
 #if defined (__APPLE__)
 extern slurmctld_config_t slurmctld_config __attribute__((weak_import));
 extern bitstr_t *avail_node_bitmap __attribute__((weak_import));
+extern active_feature_list __attribute__((weak_import));
 #else
 slurmctld_config_t slurmctld_config;
 bitstr_t *avail_node_bitmap;
+List active_feature_list;
 #endif
 
 /*
@@ -158,16 +160,6 @@ const char plugin_name[]        = "node_features knl_cray plugin";
 const char plugin_type[]        = "node_features/knl_cray";
 const uint32_t plugin_version   = SLURM_VERSION_NUMBER;
 
-/* These are defined here so when we link with something other than
- * the slurmctld we will have these symbols defined.  They will get
- * overwritten when linking with the slurmctld.
- */
-#if defined (__APPLE__)
-List active_feature_list __attribute__((weak_import));
-#else
-List active_feature_list;
-#endif
-
 /* Configuration Parameters */
 static uint16_t allow_mcdram = KNL_MCDRAM_FLAG;
 static uint16_t allow_numa = KNL_NUMA_FLAG;
-- 
GitLab