mongodb: fix build with Boost 1.91

This commit is contained in:
tb
2026-05-10 19:11:47 +00:00
parent f358ec6577
commit 2de2888828
3 changed files with 28 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ PORTROACH = limit:^4\.4\.
ONLY_FOR_ARCHS = amd64
V = 4.4.30
REVISION = 2
REVISION = 3
WANTLIB += ${COMPILER_LIBCXX}
WANTLIB += boost_filesystem-mt boost_iostreams-mt boost_log-mt
@@ -0,0 +1,13 @@
Fix build with boost 1.91
Index: src/mongo/bson/util/builder.h
--- src/mongo/bson/util/builder.h.orig
+++ src/mongo/bson/util/builder.h
@@ -39,6 +39,7 @@
#include <type_traits>
#include <boost/optional.hpp>
+#include <boost/static_assert.hpp>
#include "mongo/base/data_type_endian.h"
#include "mongo/base/data_view.h"
@@ -0,0 +1,14 @@
Fix build with boost 1.91
Index: src/mongo/db/catalog/coll_mod.cpp
--- src/mongo/db/catalog/coll_mod.cpp.orig
+++ src/mongo/db/catalog/coll_mod.cpp
@@ -358,7 +358,7 @@ Status _collModInternal(OperationContext* opCtx,
const auto sharedView = ViewCatalog::get(db)->lookup(opCtx, nss.ns());
if (sharedView) {
// We copy the ViewDefinition as it is modified below to represent the requested state.
- view = {*sharedView};
+ view = boost::optional<ViewDefinition>(*sharedView);
}
}