summaryrefslogtreecommitdiff
path: root/app-backup/bareos/files/bareos-gcc13-fixes.patch
blob: 1cd12621b4e4ab10efeffd3a5f2b0c2f46ddb88c (plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
From 2bb7d74215bf6ae4f350de11bff04b68cf3c82b3 Mon Sep 17 00:00:00 2001
From: Bruno Friedmann <bruno.friedmann@bareos.com>
Date: Mon, 27 Mar 2023 13:22:11 +0200
Subject: [PATCH 1/3] core: fixes for gcc-13 support

- add explicit system_error and stdexcept
- console_conf.cc fix std::move warning

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
---
 core/src/cats/cats.h                    | 2 ++
 core/src/console/console_conf.cc        | 4 ++--
 core/src/lib/thread_list.cc             | 3 ++-
 core/src/lib/thread_specific_data.cc    | 3 ++-
 core/src/lib/thread_specific_data.h     | 3 ++-
 core/src/lib/thread_specific_data_key.h | 4 +++-
 6 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/core/src/cats/cats.h b/core/src/cats/cats.h
index 7a6641b3f72..edb5ecbe38b 100644
--- a/core/src/cats/cats.h
+++ b/core/src/cats/cats.h
@@ -41,6 +41,8 @@
 #include "lib/output_formatter.h"
 
 #include <string>
+#include <stdexcept>
+#include <system_error>
 #include <vector>
 template <typename T> class dlist;
 
diff --git a/core/src/console/console_conf.cc b/core/src/console/console_conf.cc
index 9d3aecead2b..f0c0402744e 100644
--- a/core/src/console/console_conf.cc
+++ b/core/src/console/console_conf.cc
@@ -203,7 +203,7 @@ static bool SaveResource(int type, ResourceItem* items, int pass)
                 res_dir->resource_name_);
         } else {
           p->tls_cert_.allowed_certificate_common_names_
-              = std::move(p->tls_cert_.allowed_certificate_common_names_);
+              = std::move(res_dir->tls_cert_.allowed_certificate_common_names_);
         }
         break;
       }
diff --git a/core/src/lib/thread_list.cc b/core/src/lib/thread_list.cc
index 50aefb8ee2d..05607124a55 100644
--- a/core/src/lib/thread_list.cc
+++ b/core/src/lib/thread_list.cc
@@ -32,6 +32,7 @@
 #include <memory>
 #include <mutex>
 #include <set>
+#include <system_error>
 #include <thread>
 
 static constexpr int debuglevel{800};
diff --git a/core/src/lib/thread_specific_data.cc b/core/src/lib/thread_specific_data.cc
index 0953f5c125a..22a98c4a759 100644
--- a/core/src/lib/thread_specific_data.cc
+++ b/core/src/lib/thread_specific_data.cc
@@ -25,6 +25,7 @@
 #include "lib/thread_specific_data.h"
 #include "lib/thread_specific_data_key.h"
 #include "include/jcr.h"
+#include <system_error>
 
 JobControlRecord* GetJcrFromThreadSpecificData()
 {
diff --git a/core/src/lib/thread_specific_data.h b/core/src/lib/thread_specific_data.h
index 4bd4dedafae..4c427d171c0 100644
--- a/core/src/lib/thread_specific_data.h
+++ b/core/src/lib/thread_specific_data.h
@@ -24,6 +24,7 @@
 #ifndef BAREOS_LIB_THREAD_SPECIFIC_DATA_H_
 #define BAREOS_LIB_THREAD_SPECIFIC_DATA_H_
 
+
 class JobControlRecord;
 
 JobControlRecord* GetJcrFromThreadSpecificData();
diff --git a/core/src/lib/thread_specific_data_key.h b/core/src/lib/thread_specific_data_key.h
index 9c02c07f47e..c8c63c757fe 100644
--- a/core/src/lib/thread_specific_data_key.h
+++ b/core/src/lib/thread_specific_data_key.h
@@ -22,6 +22,8 @@
 #ifndef BAREOS_LIB_THREAD_SPECIFIC_DATA_KEY_H_
 #define BAREOS_LIB_THREAD_SPECIFIC_DATA_KEY_H_
 
+
+#include <system_error>
 #include "lib/berrno.h"
 
 #include <mutex>

From cc208707f6f4ad8c24e8ad670f10c076a27b69e4 Mon Sep 17 00:00:00 2001
From: Philipp Storz <philipp.storz@bareos.com>
Date: Mon, 3 Apr 2023 12:11:57 +0200
Subject: [PATCH 2/3] pull_request_template.md: add checkmark for backport PRs

---
From 55ee275873b7c2d663d280847fd517374394e43d Mon Sep 17 00:00:00 2001
From: Marc Schiffbauer <mschiff@gentoo.org>
Date: Thu, 20 Apr 2023 19:01:16 +0300
Subject: [PATCH] add missing include required by gcc 13

---
 core/src/stored/dev.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/src/stored/dev.cc b/core/src/stored/dev.cc
index 287a323a5..7fd0c437e 100644
--- a/core/src/stored/dev.cc
+++ b/core/src/stored/dev.cc
@@ -81,6 +81,7 @@
 #include "lib/btimers.h"
 #include "include/jcr.h"
 #include "lib/berrno.h"
+#include <stdexcept>
 
 #ifndef HAVE_DYNAMIC_SD_BACKENDS
 #  ifdef HAVE_GFAPI
-- 
2.39.2