aboutsummaryrefslogtreecommitdiffstats
path: root/databases/mongodb
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2014-05-16 15:58:04 +0800
committerale <ale@FreeBSD.org>2014-05-16 15:58:04 +0800
commitef1189f98d16a392b1fce03950db243f8a535e8f (patch)
tree5a7687d5bdd072e8cec2a7644c4c2578b586083d /databases/mongodb
parenta1a30a2c50fc19e3f46bcf6b630aa10fdccebb59 (diff)
downloadfreebsd-ports-gnome-ef1189f98d16a392b1fce03950db243f8a535e8f.tar.gz
freebsd-ports-gnome-ef1189f98d16a392b1fce03950db243f8a535e8f.tar.zst
freebsd-ports-gnome-ef1189f98d16a392b1fce03950db243f8a535e8f.zip
Fix build on 32-bit archs.
Diffstat (limited to 'databases/mongodb')
-rw-r--r--databases/mongodb/files/patch-src_mongo_db_kill_current_op.cpp11
-rw-r--r--databases/mongodb/files/patch-src_mongo_db_ops_modifier_push.cpp11
2 files changed, 22 insertions, 0 deletions
diff --git a/databases/mongodb/files/patch-src_mongo_db_kill_current_op.cpp b/databases/mongodb/files/patch-src_mongo_db_kill_current_op.cpp
new file mode 100644
index 000000000000..23061135c486
--- /dev/null
+++ b/databases/mongodb/files/patch-src_mongo_db_kill_current_op.cpp
@@ -0,0 +1,11 @@
+--- src/mongo/db/kill_current_op.cpp.orig 2014-05-15 15:30:33.100157820 +0000
++++ src/mongo/db/kill_current_op.cpp 2014-05-15 15:35:12.714138934 +0000
+@@ -152,7 +152,7 @@
+ }
+
+ // Return true with (approx) probability p = "chance". Recall: 0 <= chance <= 1.
+- double next = static_cast<double>(std::abs(checkForInterruptPRNG.nextInt64()));
++ double next = std::abs(static_cast<double>(checkForInterruptPRNG.nextInt64()));
+ double upperBound =
+ std::numeric_limits<int64_t>::max() * failPointInfo["chance"].numberDouble();
+ if (next > upperBound) {
diff --git a/databases/mongodb/files/patch-src_mongo_db_ops_modifier_push.cpp b/databases/mongodb/files/patch-src_mongo_db_ops_modifier_push.cpp
new file mode 100644
index 000000000000..e73b1c150156
--- /dev/null
+++ b/databases/mongodb/files/patch-src_mongo_db_ops_modifier_push.cpp
@@ -0,0 +1,11 @@
+--- src/mongo/db/ops/modifier_push.cpp.orig 2014-05-15 15:24:21.650184430 +0000
++++ src/mongo/db/ops/modifier_push.cpp 2014-05-15 15:25:51.014179801 +0000
+@@ -646,7 +646,7 @@
+ }
+
+ const int64_t numChildren = mutablebson::countChildren(_preparedState->elemFound);
+- int64_t countRemoved = std::max(static_cast<int64_t>(0), numChildren - abs(_slice));
++ int64_t countRemoved = std::max(static_cast<int64_t>(0), numChildren - (_slice >= 0 ? _slice : -_slice));
+
+ // If _slice is negative, remove from the bottom, otherwise from the top
+ const bool removeFromEnd = (_slice > 0);