about summary refs log tree commit diff
path: root/pkgs/servers/nosql/mongodb/fix-build-with-boost-1.79-4_4.patch
blob: 72da249f2380289ae0691a3bc5910d9ea7b08473 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From f0c7e9190e9d61515ab3f95c6665754d3b972cd1 Mon Sep 17 00:00:00 2001
From: Et7f3 <cadeaudeelie@gmail.com>
Date: Tue, 19 Jul 2022 22:11:11 +0200
Subject: [PATCH] build: Upgrade boost to 1.79.0

We can see in src/third_party/boost-1.70.0/boost/version.hpp that vendored
version of boost is BOOST_LIB_VERSION "1_70"

We can also see the doc desbribe 2 headers to use filesystems lib: One is
src/third_party/boost/boost/filesystem/fstream.hpp that contains (175-177)
  typedef basic_ifstream<char> ifstream;
  typedef basic_ofstream<char> ofstream;
  typedef basic_fstream<char> fstream;

So this mean they mostly forgot to include a header and include-what-you-use
would catch this error.

In upstream they fixed in a simmilar way
https://github.com/mongodb/mongo/commit/13389dc222fc372442be8c147e09685bb9a26a3a

Co-Authored-By: Adrian Pistol <vifino@tty.sh>
---
 src/mongo/db/storage/storage_repair_observer.cpp    | 1 +
 src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp | 1 +
 src/mongo/shell/shell_utils_extended.cpp            | 1 +
 src/mongo/util/processinfo_linux.cpp                | 2 +-
 src/mongo/util/stacktrace_threads.cpp               | 1 +
 5 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mongo/db/storage/storage_repair_observer.cpp b/src/mongo/db/storage/storage_repair_observer.cpp
index 22b76a6a39c..453f48229cd 100644
--- a/src/mongo/db/storage/storage_repair_observer.cpp
+++ b/src/mongo/db/storage/storage_repair_observer.cpp
@@ -42,6 +42,7 @@
 #endif
 
 #include <boost/filesystem/path.hpp>
+#include <boost/filesystem/fstream.hpp>
 
 #include "mongo/db/dbhelpers.h"
 #include "mongo/db/operation_context.h"
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
index ee87aca4723..bde2c1b2b83 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
@@ -37,6 +37,7 @@
 
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/path.hpp>
+#include <boost/filesystem/fstream.hpp>
 #include <pcrecpp.h>
 
 #include "mongo/base/simple_string_data_comparator.h"
diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp
index 8cd7f035f1d..cd672eb513f 100644
--- a/src/mongo/shell/shell_utils_extended.cpp
+++ b/src/mongo/shell/shell_utils_extended.cpp
@@ -37,6 +37,7 @@
 #endif
 
 #include <boost/filesystem.hpp>
+#include <boost/filesystem/fstream.hpp>
 #include <fstream>
 
 #include "mongo/bson/bson_validate.h"
diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
index 9063f140988..d74949d45fc 100644
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -33,7 +33,7 @@
 
 #include "processinfo.h"
 
-#include <iostream>
+#include <fstream>
 #include <malloc.h>
 #include <pcrecpp.h>
 #include <sched.h>
diff --git a/src/mongo/util/stacktrace_threads.cpp b/src/mongo/util/stacktrace_threads.cpp
index 4667a261ab7..73a36015bd6 100644
--- a/src/mongo/util/stacktrace_threads.cpp
+++ b/src/mongo/util/stacktrace_threads.cpp
@@ -36,6 +36,7 @@
 #include <array>
 #include <atomic>
 #include <boost/filesystem.hpp>
+#include <boost/filesystem/fstream.hpp>
 #include <cctype>
 #include <cstdint>
 #include <cstdlib>
-- 
2.39.2