about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/logic/minisat/darwin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/logic/minisat/darwin.patch')
-rw-r--r--nixpkgs/pkgs/applications/science/logic/minisat/darwin.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/logic/minisat/darwin.patch b/nixpkgs/pkgs/applications/science/logic/minisat/darwin.patch
new file mode 100644
index 000000000000..f2b618d6bb3a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/minisat/darwin.patch
@@ -0,0 +1,26 @@
+https://github.com/fasterthanlime/homebrew-mingw/blob/master/Library/Formula/minisat.rb
+
+diff --git a/utils/System.cc b/utils/System.cc
+index a7cf53f..feeaf3c 100644
+--- a/utils/System.cc
++++ b/utils/System.cc
+@@ -78,16 +78,17 @@ double Minisat::memUsed(void) {
+     struct rusage ru;
+     getrusage(RUSAGE_SELF, &ru);
+     return (double)ru.ru_maxrss / 1024; }
+-double MiniSat::memUsedPeak(void) { return memUsed(); }
++double Minisat::memUsedPeak(void) { return memUsed(); }
+ 
+ 
+ #elif defined(__APPLE__)
+ #include <malloc/malloc.h>
+ 
+-double Minisat::memUsed(void) {
++double Minisat::memUsed() {
+     malloc_statistics_t t;
+     malloc_zone_statistics(NULL, &t);
+     return (double)t.max_size_in_use / (1024*1024); }
++double Minisat::memUsedPeak() { return memUsed(); }
+ 
+ #else
+ double Minisat::memUsed() {