From e858cfaf73eadb4cf4076a754c4836816c908d44 Mon Sep 17 00:00:00 2001
From: Petr Votava <votava.petr@gene.com>
Date: Thu, 29 Jun 2017 16:53:48 +0000
Subject: [PATCH] A patch for slurm plugin build

---
 src/slurm/Makefile.am   | 2 +-
 src/slurm/singularity.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/slurm/Makefile.am b/src/slurm/Makefile.am
index 860c7667d..152e41450 100644
--- a/src/slurm/Makefile.am
+++ b/src/slurm/Makefile.am
@@ -4,7 +4,7 @@ plugindir = $(libdir)/slurm
 if WITH_SLURM
 plugin_LTLIBRARIES = singularity_spank.la
 singularity_spank_la_SOURCES = singularity.c
-singularity_spank_la_LIBADD = ../lib/libsingularity_internal.la
+singularity_spank_la_LIBADD = ../lib/runtime/libinternal.la
 singularity_spank_la_LDFLAGS = -module -no-undefined -avoid-version -export-symbols-regex '^slurm_spank_|^plugin_'
 endif
 
diff --git a/src/slurm/singularity.c b/src/slurm/singularity.c
index acddddfd1..3509f4d8e 100644
--- a/src/slurm/singularity.c
+++ b/src/slurm/singularity.c
@@ -22,6 +22,7 @@
 
 #define _GNU_SOURCE 1
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -29,9 +30,9 @@
 #include <string.h>
 
 #include "config.h"
-#include "lib/singularity.h"
 #include "util/util.h"
 #include "util/file.h"
+#include "util/registry.h"
 
 #include "slurm/spank.h"
 
@@ -169,7 +170,6 @@ static int setup_container(spank_t spank)
     }
 
 
-    char *image;
     if ( ( image = singularity_registry_get("IMAGE") ) == NULL ) {
         singularity_message(ERROR, "SINGULARITY_CONTAINER not defined!\n");
     }
