Merge pull request #175039 from azahi/clingcon-fix

clingcon: fix build
This commit is contained in:
Robert Scott 2022-05-28 12:40:54 +01:00 committed by GitHub
commit 17b62c338f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View file

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