about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-15T11·11+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-15T11·11+0100
commit02654f782f31d142f59af23d4a10dcf9134a7ff2 (patch)
tree18739a6a41a3cc01ac94fb867554496d1be69f69
parent00a75b1cd281e85843cae5da5d605f6e3bc733f1 (diff)
Fix Darwin build
http://hydra.nixos.org/build/33279996
-rw-r--r--src/libstore/crypto.cc2
-rw-r--r--src/libstore/crypto.hh2
-rw-r--r--src/libstore/http-binary-cache-store.cc2
-rw-r--r--src/libstore/nar-accessor.cc4
-rw-r--r--src/libutil/ref.hh1
-rw-r--r--src/nix/legacy.hh1
6 files changed, 8 insertions, 4 deletions
diff --git a/src/libstore/crypto.cc b/src/libstore/crypto.cc
index 53e94e1f5997..caba22c1e274 100644
--- a/src/libstore/crypto.cc
+++ b/src/libstore/crypto.cc
@@ -37,10 +37,12 @@ SecretKey::SecretKey(const string & s)
 #endif
 }
 
+#if !HAVE_SODIUM
 [[noreturn]] static void noSodium()
 {
     throw Error("Nix was not compiled with libsodium, required for signed binary cache support");
 }
+#endif
 
 std::string SecretKey::signDetached(const std::string & data) const
 {
diff --git a/src/libstore/crypto.hh b/src/libstore/crypto.hh
index 33b79cb2e8fe..38d5fe2a80c6 100644
--- a/src/libstore/crypto.hh
+++ b/src/libstore/crypto.hh
@@ -39,7 +39,7 @@ struct PublicKey : Key
 private:
     PublicKey(const std::string & name, const std::string & key)
         : Key(name, key) { }
-    friend class SecretKey;
+    friend struct SecretKey;
 };
 
 typedef std::map<std::string, PublicKey> PublicKeys;
diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc
index 9614d0b4cf35..1d707c043a72 100644
--- a/src/libstore/http-binary-cache-store.cc
+++ b/src/libstore/http-binary-cache-store.cc
@@ -48,7 +48,7 @@ protected:
         }
     }
 
-    void upsertFile(const std::string & path, const std::string & data)
+    void upsertFile(const std::string & path, const std::string & data) override
     {
         throw Error("uploading to an HTTP binary cache is not supported");
     }
diff --git a/src/libstore/nar-accessor.cc b/src/libstore/nar-accessor.cc
index ff7890af8c80..8896862be149 100644
--- a/src/libstore/nar-accessor.cc
+++ b/src/libstore/nar-accessor.cc
@@ -33,7 +33,7 @@ struct NarIndexer : ParseSink, StringSource
     {
     }
 
-    void createDirectory(const Path & path)
+    void createDirectory(const Path & path) override
     {
         members.emplace(path,
             NarMember{FSAccessor::Type::tDirectory, false, 0, 0});
@@ -44,7 +44,7 @@ struct NarIndexer : ParseSink, StringSource
         currentPath = path;
     }
 
-    void isExecutable()
+    void isExecutable() override
     {
         isExec = true;
     }
diff --git a/src/libutil/ref.hh b/src/libutil/ref.hh
index a6d338d79622..349f24f7c488 100644
--- a/src/libutil/ref.hh
+++ b/src/libutil/ref.hh
@@ -2,6 +2,7 @@
 
 #include <memory>
 #include <exception>
+#include <stdexcept>
 
 namespace nix {
 
diff --git a/src/nix/legacy.hh b/src/nix/legacy.hh
index b67b70eb5c85..f503b0da3e1a 100644
--- a/src/nix/legacy.hh
+++ b/src/nix/legacy.hh
@@ -2,6 +2,7 @@
 
 #include <functional>
 #include <map>
+#include <string>
 
 namespace nix {