From 4b5813051b6f7b4cd941a39b5da50d084a5f46c3 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <edolstra@gmail.com>
Date: Tue, 4 Aug 2020 11:34:05 +0200
Subject: [PATCH] unsigned long long -> uint64_t

---
 src/hydra-queue-runner/build-result.hh       | 2 +-
 src/hydra-queue-runner/hydra-queue-runner.cc | 3 +--
 src/hydra-queue-runner/nar-extractor.cc      | 2 +-
 src/hydra-queue-runner/nar-extractor.hh      | 2 +-
 src/hydra-queue-runner/queue-monitor.cc      | 4 ++--
 5 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/hydra-queue-runner/build-result.hh b/src/hydra-queue-runner/build-result.hh
index 4cbbaccb..a3f71ae9 100644
--- a/src/hydra-queue-runner/build-result.hh
+++ b/src/hydra-queue-runner/build-result.hh
@@ -32,7 +32,7 @@ struct BuildOutput
 
     std::string releaseName;
 
-    unsigned long long closureSize = 0, size = 0;
+    uint64_t closureSize = 0, size = 0;
 
     std::list<BuildProduct> products;
 
diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc
index 2d616840..38bb1503 100644
--- a/src/hydra-queue-runner/hydra-queue-runner.cc
+++ b/src/hydra-queue-runner/hydra-queue-runner.cc
@@ -23,8 +23,7 @@ using namespace nix;
 namespace nix {
 
 template<> void toJSON<std::atomic<long>>(std::ostream & str, const std::atomic<long> & n) { str << n; }
-template<> void toJSON<std::atomic<unsigned long>>(std::ostream & str, const std::atomic<unsigned long> & n) { str << n; }
-template<> void toJSON<std::atomic<unsigned long long>>(std::ostream & str, const std::atomic<unsigned long long> & n) { str << n; }
+template<> void toJSON<std::atomic<uint64_t>>(std::ostream & str, const std::atomic<uint64_t> & n) { str << n; }
 template<> void toJSON<double>(std::ostream & str, const double & n) { str << n; }
 
 }
diff --git a/src/hydra-queue-runner/nar-extractor.cc b/src/hydra-queue-runner/nar-extractor.cc
index 8705e4ce..5c2cd97c 100644
--- a/src/hydra-queue-runner/nar-extractor.cc
+++ b/src/hydra-queue-runner/nar-extractor.cc
@@ -36,7 +36,7 @@ struct Extractor : ParseSink
         }).first->second;
     }
 
-    std::optional<unsigned long long> expectedSize;
+    std::optional<uint64_t> expectedSize;
     std::unique_ptr<HashSink> hashSink;
 
     void preallocateContents(uint64_t size) override
diff --git a/src/hydra-queue-runner/nar-extractor.hh b/src/hydra-queue-runner/nar-extractor.hh
index d14726a3..45b2706c 100644
--- a/src/hydra-queue-runner/nar-extractor.hh
+++ b/src/hydra-queue-runner/nar-extractor.hh
@@ -8,7 +8,7 @@
 struct NarMemberData
 {
     nix::FSAccessor::Type type;
-    std::optional<unsigned long long> fileSize;
+    std::optional<uint64_t> fileSize;
     std::optional<std::string> contents;
     std::optional<nix::Hash> sha256;
 };
diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc
index ee073b53..f1cc0ef7 100644
--- a/src/hydra-queue-runner/queue-monitor.cc
+++ b/src/hydra-queue-runner/queue-monitor.cc
@@ -631,8 +631,8 @@ BuildOutput State::getBuildOutputCached(Connection & conn, nix::ref<nix::Store>
         BuildOutput res;
         res.failed = r[0][1].as<int>() == bsFailedWithOutput;
         res.releaseName = r[0][2].is_null() ? "" : r[0][2].as<std::string>();
-        res.closureSize = r[0][3].is_null() ? 0 : r[0][3].as<unsigned long long>();
-        res.size = r[0][4].is_null() ? 0 : r[0][4].as<unsigned long long>();
+        res.closureSize = r[0][3].is_null() ? 0 : r[0][3].as<uint64_t>();
+        res.size = r[0][4].is_null() ? 0 : r[0][4].as<uint64_t>();
 
         auto products = txn.exec_params
             ("select type, subtype, fileSize, sha256hash, path, name, defaultPath from BuildProducts where build = $1 order by productnr",