clingcon: fix build

Fix build https://hydra.nixos.org/build/178237905
This commit is contained in:
Azat Bahawi 2022-05-28 02:21:13 +03:00
parent 2be2461a98
commit aa8447dd0c
No known key found for this signature in database
GPG Key ID: C8C6BDDB3847F72B
2 changed files with 28 additions and 0 deletions

View File

@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
sha256 = "1g2xkz9nsgqnrw3fdf5jchl16f0skj5mm32va61scc2yrchll166";
};
patches = [
./clingcon_limits.patch
];
postPatch = ''
cp ${catch2}/include/catch2/catch.hpp libclingcon/tests/catch.hpp
'';

View File

@ -0,0 +1,24 @@
diff --git i/libclingcon/clingcon/base.hh w/libclingcon/clingcon/base.hh
index 2d449fe..0b5fa17 100644
--- i/libclingcon/clingcon/base.hh
+++ w/libclingcon/clingcon/base.hh
@@ -28,6 +28,7 @@
#include <clingo.hh>
#include <optional>
#include <forward_list>
+#include <limits>
//! @file clingcon/base.hh
//! Basic data types.
diff --git i/libclingcon/clingcon/util.hh w/libclingcon/clingcon/util.hh
index df4cddd..308259e 100644
--- i/libclingcon/clingcon/util.hh
+++ w/libclingcon/clingcon/util.hh
@@ -30,6 +30,7 @@
#include <map>
#include <cstdlib>
#include <stdexcept>
+#include <limits>
//! @file clingcon/util.hh
//! Very general utility functions.