summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorwrobell <wrobell@riseup.net>2025-05-23 17:44:04 +0100
committerAndreas Enge <andreas@enge.fr>2025-06-01 16:01:03 +0200
commit7b66b41ce5cee48b14eb6cce3bb4b26f5b058652 (patch)
tree34275d945fb5ca1f720e51a1bee12562cf05a975 /nix
parent3f695db271d8b99dfd0f65e4436a6fd1ed9ec7a0 (diff)
daemon: Fix build failure with gcc@15.
* nix/libstore/build.cc (CompareGoalPtrs::operator): Add const keyword. * nix/libstore/store-api.hh: Add missing include for uint64_t. Change-Id: I56368da9eb10dc376f7e6eeae6a61746bb36c9cf Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'nix')
-rw-r--r--nix/libstore/build.cc4
-rw-r--r--nix/libstore/store-api.hh1
2 files changed, 3 insertions, 2 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 9701af8079e..993876c6d10 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -103,7 +103,7 @@ typedef std::shared_ptr<Goal> GoalPtr;
typedef std::weak_ptr<Goal> WeakGoalPtr;
struct CompareGoalPtrs {
- bool operator() (const GoalPtr & a, const GoalPtr & b);
+ bool operator() (const GoalPtr & a, const GoalPtr & b) const;
};
/* Set of goals. */
@@ -201,7 +201,7 @@ protected:
};
-bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) {
+bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) const {
string s1 = a->key();
string s2 = b->key();
return s1 < s2;
diff --git a/nix/libstore/store-api.hh b/nix/libstore/store-api.hh
index 82a79e50e2c..32a8f2c795f 100644
--- a/nix/libstore/store-api.hh
+++ b/nix/libstore/store-api.hh
@@ -4,6 +4,7 @@
#include "serialise.hh"
#include <string>
+#include <cstdint>
#include <map>
#include <memory>