about summary refs log tree commit diff
path: root/src/nix-env/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/main.cc')
-rw-r--r--src/nix-env/main.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 71c22d1a51e0..0d84bc610dfd 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -11,6 +11,7 @@
 
 #include <cerrno>
 #include <ctime>
+#include <algorithm>
 
 
 typedef enum {
@@ -871,7 +872,7 @@ static void opDefaultExpr(Globals & globals,
 
 
 static string needArg(Strings::iterator & i,
-    const Strings & args, const string & arg)
+    Strings & args, const string & arg)
 {
     ++i;
     if (i == args.end()) throw UsageError(