package/bitcoin: fix build with gcc 13.x

Fixes:
http://autobuild.buildroot.net/results/8ac/8aceefdb71814c48163d7b171783172b6e1fdf27/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
master
Bernd Kuhls 2023-07-30 18:10:02 +02:00 committed by Thomas Petazzoni
parent 5010cac497
commit dc08ac951d
3 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,48 @@
From 339a95b7537b47e5d6b732c0633a00afd96e3ca0 Mon Sep 17 00:00:00 2001
From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
Date: Thu, 19 Jan 2023 19:35:43 +0100
Subject: [PATCH] Add missing includes to fix gcc-13 compile error
Upstream: https://github.com/bitcoin/bitcoin/commit/fadeb6b103cb441e0e91ef506ef29febabb10715
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
src/support/lockedpool.cpp | 3 +++
src/support/lockedpool.h | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp
index 26de780f2..11131d551 100644
--- a/src/support/lockedpool.cpp
+++ b/src/support/lockedpool.cpp
@@ -22,6 +22,9 @@
#endif
#include <algorithm>
+#include <limits>
+#include <stdexcept>
+#include <utility>
#ifdef ARENA_DEBUG
#include <iomanip>
#include <iostream>
diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h
index b9e2e99d1..25b4c0f36 100644
--- a/src/support/lockedpool.h
+++ b/src/support/lockedpool.h
@@ -5,11 +5,11 @@
#ifndef BITCOIN_SUPPORT_LOCKEDPOOL_H
#define BITCOIN_SUPPORT_LOCKEDPOOL_H
-#include <stdint.h>
+#include <cstddef>
#include <list>
#include <map>
-#include <mutex>
#include <memory>
+#include <mutex>
#include <unordered_map>
/**
--
2.39.2

View File

@ -0,0 +1,34 @@
From c187efa907fd64ea2c7b7d699c5c97f9d5b79960 Mon Sep 17 00:00:00 2001
From: fanquake <fanquake@gmail.com>
Date: Thu, 9 Jun 2022 16:26:55 +0100
Subject: [PATCH] refactor: add most of src/util to iwyu
These files change infrequently, and not much header shuffling is required.
We don't add everything in src/util/ yet, because IWYU makes some
dubious suggestions, which I'm going to follow up with upstream.
Upstream: https://github.com/bitcoin/bitcoin/commit/07f2c25d04c39a0074e1d9ee1b24b3e359c8153f
[Bernd: backported relevant part from upstream commit to version 0.21.2
to fix build error with gcc 13.x]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
src/util/bip32.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/bip32.h b/src/util/bip32.h
index 347e83db9..6ef051c48 100644
--- a/src/util/bip32.h
+++ b/src/util/bip32.h
@@ -6,6 +6,7 @@
#define BITCOIN_UTIL_BIP32_H
#include <attributes.h>
+#include <cstdint>
#include <string>
#include <vector>
--
2.39.2

View File

@ -0,0 +1,23 @@
From fa2deae2a86417d7e0d4cd33fb933b1000d20313 Mon Sep 17 00:00:00 2001
From: MacroFake <falke.marco@gmail.com>
Date: Thu, 5 May 2022 08:28:29 +0200
Subject: [PATCH] Wrap boost::replace_all
Upstream: https://github.com/bitcoin/bitcoin/commit/fa2deae2a86417d7e0d4cd33fb933b1000d20313
[Bernd: backported relevant part from upstream commit to version 0.21.2
to fix build error with gcc 13.x]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
diff --git a/src/util/string.h b/src/util/string.h
index 2e91347b27a10..df20e34ae9aaa 100644
--- a/src/util/string.h
+++ b/src/util/string.h
@@ -9,6 +9,7 @@
#include <algorithm>
#include <array>
+#include <cstdint>
#include <cstring>
#include <locale>
#include <sstream>