From c4a40949d945b4a3be85ad68b8cfb449843f34a6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Mar 2017 13:52:54 +0100 Subject: Handle importing NARs containing files greater than 4 GiB Also templatize readInt() to work for various integer types. --- src/libstore/derivations.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstore/derivations.cc') 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(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(in); - nr = readInt(in); - for (unsigned int n = 0; n < nr; n++) { + nr = readNum(in); + for (size_t n = 0; n < nr; n++) { auto key = readString(in); auto value = readString(in); drv.env[key] = value; -- cgit 1.4.1