From f7d8dc443af8247e69e57148f560e467c1e4d301 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Mon, 13 Nov 2006 22:32:02 +0000
Subject: [PATCH] Make slurmd/slurmstepd conf variable an extern to build
 cons_res plugin on osx.

---
 src/slurmd/slurmd/slurmd.c         | 3 ++-
 src/slurmd/slurmd/slurmd.h         | 4 ++--
 src/slurmd/slurmstepd/slurmstepd.c | 5 ++++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c
index f05f5d41567..52802ce3d4c 100644
--- a/src/slurmd/slurmd/slurmd.c
+++ b/src/slurmd/slurmd/slurmd.c
@@ -2,7 +2,7 @@
  *  src/slurmd/slurmd/slurmd.c - main slurm node server daemon
  *  $Id$
  *****************************************************************************
- *  Copyright (C) 2002 The Regents of the University of California.
+ *  Copyright (C) 2002-2006 The Regents of the University of California.
  *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
  *  Written by Mark Grondona <mgrondona@llnl.gov>.
  *  UCRL-CODE-217948.
@@ -90,6 +90,7 @@
 
 /* global, copied to STDERR_FILENO in tasks before the exec */
 int devnull = -1;
+slurmd_conf_t * conf;
 
 /*
  * count of active threads
diff --git a/src/slurmd/slurmd/slurmd.h b/src/slurmd/slurmd/slurmd.h
index 4b95aab47ef..fa0470a7d92 100644
--- a/src/slurmd/slurmd/slurmd.h
+++ b/src/slurmd/slurmd/slurmd.h
@@ -2,7 +2,7 @@
  * src/slurmd/slurmd/slurmd.h - header for slurmd
  * $Id$
  *****************************************************************************
- *  Copyright (C) 2002 The Regents of the University of California.
+ *  Copyright (C) 2002-2006 The Regents of the University of California.
  *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
  *  Written by Mark Grondona <mgrondona@llnl.gov>.
  *  UCRL-CODE-217948.
@@ -126,7 +126,7 @@ typedef struct slurmd_config {
 	uint16_t        fast_schedule;	/* use config from file/slurmctld  */
 } slurmd_conf_t;
 
-slurmd_conf_t * conf;
+extern slurmd_conf_t * conf;
 
 /* Send node registration message with status to controller
  * IN status - same values slurm error codes (for node shutdown)
diff --git a/src/slurmd/slurmstepd/slurmstepd.c b/src/slurmd/slurmstepd/slurmstepd.c
index 3030536242d..2a28531a532 100644
--- a/src/slurmd/slurmstepd/slurmstepd.c
+++ b/src/slurmd/slurmstepd/slurmstepd.c
@@ -2,7 +2,7 @@
  *  src/slurmd/slurmstepd/slurmstepd.c - SLURM job-step manager.
  *  $Id$
  *****************************************************************************
- *  Copyright (C) 2002 The Regents of the University of California.
+ *  Copyright (C) 2002-2006 The Regents of the University of California.
  *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
  *  Written by Danny Auble <da@llnl.gov> 
  *  and Christopher Morrone <morrone2@llnl.gov>.
@@ -74,6 +74,9 @@ int slurmstepd_blocked_signals[] = {
 	SIGPIPE, 0
 };
 
+/* global variable */
+slurmd_conf_t * conf;
+
 int 
 main (int argc, char *argv[])
 {
-- 
GitLab