aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc2
-rw-r--r--src/libstore/download.cc4
-rw-r--r--src/libstore/download.hh8
3 files changed, 9 insertions, 5 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index fe861e629..bf259e0b6 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -24,8 +24,8 @@
#include <chrono>
#include <regex>
#include <queue>
+#include <climits>
-#include <limits.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/types.h>
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index a5165773a..d49d63912 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -34,6 +34,10 @@ DownloadSettings downloadSettings;
static GlobalConfig::Register r1(&downloadSettings);
+CachedDownloadRequest::CachedDownloadRequest(const std::string & uri)
+ : uri(uri), ttl(settings.tarballTtl)
+{ }
+
std::string resolveUri(const std::string & uri)
{
if (uri.compare(0, 8, "channel:") == 0)
diff --git a/src/libstore/download.hh b/src/libstore/download.hh
index c5dd893b5..487036833 100644
--- a/src/libstore/download.hh
+++ b/src/libstore/download.hh
@@ -2,7 +2,7 @@
#include "types.hh"
#include "hash.hh"
-#include "globals.hh"
+#include "config.hh"
#include <string>
#include <future>
@@ -71,12 +71,12 @@ struct CachedDownloadRequest
bool unpack = false;
std::string name;
Hash expectedHash;
- unsigned int ttl = settings.tarballTtl;
+ unsigned int ttl;
bool gcRoot = false;
bool getLastModified = false;
- CachedDownloadRequest(const std::string & uri)
- : uri(uri) { }
+ CachedDownloadRequest(const std::string & uri);
+ CachedDownloadRequest() = delete;
};
struct CachedDownloadResult