about summary refs log tree commit diff
path: root/src/libstore/derivations.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-03-01T12·52+0100
committerEelco Dolstra <edolstra@gmail.com>2017-03-01T12·52+0100
commitc4a40949d945b4a3be85ad68b8cfb449843f34a6 (patch)
tree535f9679b01e677114e5ac947d7d4a7c88917cab /src/libstore/derivations.cc
parent07808052461e9534dc42f7f98e83a7b58565fd13 (diff)
Handle importing NARs containing files greater than 4 GiB
Also templatize readInt() to work for various integer types.
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r--src/libstore/derivations.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 79526c594f71..ce1ac7d33229 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -397,8 +397,8 @@ PathSet BasicDerivation::outputPaths() const
 Source & readDerivation(Source & in, Store & store, BasicDerivation & drv)
 {
     drv.outputs.clear();
-    auto nr = readInt(in);
-    for (unsigned int n = 0; n < nr; n++) {
+    auto nr = readNum<size_t>(in);
+    for (size_t n = 0; n < nr; n++) {
         auto name = readString(in);
         DerivationOutput o;
         in >> o.path >> o.hashAlgo >> o.hash;
@@ -410,8 +410,8 @@ Source & readDerivation(Source & in, Store & store, BasicDerivation & drv)
     in >> drv.platform >> drv.builder;
     drv.args = readStrings<Strings>(in);
 
-    nr = readInt(in);
-    for (unsigned int n = 0; n < nr; n++) {
+    nr = readNum<size_t>(in);
+    for (size_t n = 0; n < nr; n++) {
         auto key = readString(in);
         auto value = readString(in);
         drv.env[key] = value;