archrelease: copy trunk to community-any
[ArchLinux/community.git] / ceph / trunk / ceph-15.2.14-gcc12.patch
blob86c02f1f26729546d9f8c2bb4cbb719e67580860
1 From 963d756ded40f5adf2efef53893c917bec1845c1 Mon Sep 17 00:00:00 2001
2 From: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 Date: Wed, 19 Jan 2022 15:24:11 +0000
4 Subject: [PATCH] common: fix FTBFS due to dout & need_dynamic on GCC-12
6 For details see:
7 https://gist.github.com/rzarzynski/d6d2df6888923bef6a3e764f4856853f.
9 Special thanks to Kaleb Keithley who reported the issue
10 and tested the fix!
12 Fixes: https://tracker.ceph.com/issues/53896
13 Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
14 ---
15 src/common/dout.h | 5 +++--
16 1 file changed, 3 insertions(+), 2 deletions(-)
18 diff --git a/src/common/dout.h b/src/common/dout.h
19 index 421222d535f8d..a1375fbb91026 100644
20 --- a/src/common/dout.h
21 +++ b/src/common/dout.h
22 @@ -99,11 +99,12 @@ namespace ceph::dout {
23 template<typename T>
24 struct dynamic_marker_t {
25 T value;
26 - operator T() const { return value; }
27 + // constexpr ctor isn't needed as it's an aggregate type
28 + constexpr operator T() const { return value; }
31 template<typename T>
32 -dynamic_marker_t<T> need_dynamic(T&& t) {
33 +constexpr dynamic_marker_t<T> need_dynamic(T&& t) {
34 return dynamic_marker_t<T>{ std::forward<T>(t) };
38 From 7c381ba985bd1398ef7d145cc00fae9d0db510e3 Mon Sep 17 00:00:00 2001
39 From: Kefu Chai <tchaikov@gmail.com>
40 Date: Mon, 28 Feb 2022 21:46:39 +0800
41 Subject: [PATCH] include/buffer: include <memory>
43 to address following FTBFS:
45 /usr/bin/ccache /usr/bin/clang++-13 -DBOOST_ALL_NO_LIB -DBOOST_ASIO_DISABLE_CONCEPTS -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_T$
46 In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.cc:4:
47 In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.h:14:
48 In file included from /var/ssd/ceph/src/include/denc.h:47:
49 /var/ssd/ceph/src/include/buffer.h:98:37: error: no template named 'unique_ptr' in namespace 'std'; did you mean 'boost::movelib::unique_ptr'?
50 struct unique_leakable_ptr : public std::unique_ptr<T, ceph::nop_delete<T>> {
51 ^~~~~~~~~~~~~~~
52 boost::movelib::unique_ptr
53 /opt/ceph/include/boost/move/unique_ptr.hpp:354:7: note: 'boost::movelib::unique_ptr' declared here
54 class unique_ptr
57 Signed-off-by: Kefu Chai <tchaikov@gmail.com>
58 ---
59 src/include/buffer.h | 1 +
60 1 file changed, 1 insertion(+)
62 diff --git a/src/include/buffer.h b/src/include/buffer.h
63 index 0c89367dd3b2c..8a28d846d9d46 100644
64 --- a/src/include/buffer.h
65 +++ b/src/include/buffer.h
66 @@ -41,6 +41,7 @@
67 #include <iosfwd>
68 #include <iomanip>
69 #include <list>
70 +#include <memory>
71 #include <vector>
72 #include <string>
73 #if __cplusplus >= 201703L