summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch33
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch
new file mode 100644
index 0000000000..def17995dc
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch
@@ -0,0 +1,33 @@
1From 81eabea4e4da55cddfe8bcfcbc3759fa90948254 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 3 Mar 2023 14:13:29 -0800
4Subject: [PATCH] Fix type mismatch on 32bit arches
5
6std::set::size returns an unsigned integral type.
7std::max call therefore gets (unsigned int, unsigned long) here.
8Type of both arguments is not same, so its ambigous
9and there is no matching std::max implementation for mismatching
10arguments. std::max expects both input variables to be of
11same type, max(int,int) etc..
12
13Fixes
14src/mongo/util/processinfo_linux.cpp:424:16: error: no matching function for call to 'max'
15 return std::max(socketIds.size(), 1ul);
16
17Upstream-Status: Submitted [https://jira.mongodb.org/browse/SERVER-74633]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 src/mongo/util/processinfo_linux.cpp | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23--- a/src/mongo/util/processinfo_linux.cpp
24+++ b/src/mongo/util/processinfo_linux.cpp
25@@ -421,7 +421,7 @@ public:
26
27 // On ARM64, the "physical id" field is unpopulated, causing there to be 0 sockets found. In
28 // this case, we default to 1.
29- return std::max(socketIds.size(), 1ul);
30+ return std::max(static_cast<unsigned long>(socketIds.size()), 1ul);
31 }
32
33 /**
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
index f35fb630e6..7b85bdddab 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
@@ -35,6 +35,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \
35 file://0001-The-std-lib-unary-binary_function-base-classes-are-d.patch \ 35 file://0001-The-std-lib-unary-binary_function-base-classes-are-d.patch \
36 file://0001-free_mon-Include-missing-cstdint.patch \ 36 file://0001-free_mon-Include-missing-cstdint.patch \
37 file://0001-apply-msvc-workaround-for-clang-16.patch \ 37 file://0001-apply-msvc-workaround-for-clang-16.patch \
38 file://0001-Fix-type-mismatch-on-32bit-arches.patch \
38 " 39 "
39SRC_URI:append:libc-musl ="\ 40SRC_URI:append:libc-musl ="\
40 file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ 41 file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \