diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-08-30 17:38:09 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-08-30 17:38:09 +0200 |
commit | d74c8a3f4e1131ee9dbd9898d141789832802306 (patch) | |
tree | 99e45fd0c08b740f06455eb6490543c521d5d1a3 /src | |
parent | 6631a6e1a15784214bae468a4fdd3168aeef4ab7 (diff) |
Fix 32-bit build
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/json.cc | 5 | ||||
-rw-r--r-- | src/libutil/json.hh | 1 | ||||
-rw-r--r-- | src/nix/path-info.cc | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/libutil/json.cc b/src/libutil/json.cc index 619b1d631..ecc3fdfe5 100644 --- a/src/libutil/json.cc +++ b/src/libutil/json.cc @@ -29,6 +29,11 @@ void toJSON(std::ostream & str, const char * s) if (!s) str << "null"; else toJSON(str, s, s + strlen(s)); } +void toJSON(std::ostream & str, unsigned long long n) +{ + str << n; +} + void toJSON(std::ostream & str, unsigned long n) { str << n; diff --git a/src/libutil/json.hh b/src/libutil/json.hh index 852000a51..aec456845 100644 --- a/src/libutil/json.hh +++ b/src/libutil/json.hh @@ -9,6 +9,7 @@ namespace nix { void toJSON(std::ostream & str, const char * start, const char * end); void toJSON(std::ostream & str, const std::string & s); void toJSON(std::ostream & str, const char * s); +void toJSON(std::ostream & str, unsigned long long n); void toJSON(std::ostream & str, unsigned long n); void toJSON(std::ostream & str, long n); void toJSON(std::ostream & str, double f); diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc index b25e60db6..d8b6232d4 100644 --- a/src/nix/path-info.cc +++ b/src/nix/path-info.cc @@ -1,11 +1,8 @@ #include "command.hh" #include "shared.hh" #include "store-api.hh" - - #include "json.hh" - #include <iomanip> #include <algorithm> @@ -60,8 +57,8 @@ struct CmdPathInfo : StorePathsCommand for (auto & storePath : storePaths) pathLen = std::max(pathLen, storePath.size()); - auto getClosureSize = [&](const Path & storePath) { - size_t totalSize = 0; + auto getClosureSize = [&](const Path & storePath) -> unsigned long long { + unsigned long long totalSize = 0; PathSet closure; store->computeFSClosure(storePath, closure, false, false); for (auto & p : closure) |