about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc15
-rw-r--r--src/libmain/shared.hh5
2 files changed, 11 insertions, 9 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 09841e45befb..a67d2c47085c 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -70,15 +70,6 @@ static unsigned int getIntArg(const string & opt,
 }
 
 
-struct RemoveTempRoots 
-{
-    ~RemoveTempRoots()
-    {
-        removeTempRoots();
-    }
-};
-
-
 void initDerivationsHelpers();
 
 
@@ -99,6 +90,12 @@ static void closeStore()
 }
 
 
+RemoveTempRoots::~RemoveTempRoots()
+{
+    removeTempRoots();
+}
+
+
 /* Initialize and reorder arguments, then call the actual argument
    processor. */
 static void initAndRun(int argc, char * * argv)
diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh
index a7e46c927d08..62f505189f83 100644
--- a/src/libmain/shared.hh
+++ b/src/libmain/shared.hh
@@ -33,6 +33,11 @@ extern volatile ::sig_atomic_t blockInt;
 
 MakeError(UsageError, nix::Error);
 
+struct RemoveTempRoots 
+{
+    ~RemoveTempRoots();    
+};
+
 }