aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-01-20 10:22:35 +0000
committerfanquake <fanquake@gmail.com>2023-01-20 10:26:36 +0000
commit392dc68e37be9fc7adb32496b13d9b50262e317d (patch)
tree0592d61d33af8f6287c8fa2a8d20d68759e92016 /src
parenteebc24bfc6d2d809952e27c7fe269452f319455f (diff)
parentfadeb6b103cb441e0e91ef506ef29febabb10715 (diff)
downloadbitcoin-392dc68e37be9fc7adb32496b13d9b50262e317d.tar.xz
Merge bitcoin/bitcoin#26924: refactor: Add missing includes to fix gcc-13 compile error
fadeb6b103cb441e0e91ef506ef29febabb10715 Add missing includes to fix gcc-13 compile error (MarcoFalke) Pull request description: On current master: ``` CXX support/libbitcoin_util_a-lockedpool.o support/lockedpool.cpp: In member function ‘void Arena::free(void*)’: support/lockedpool.cpp:99:20: error: ‘runtime_error’ is not a member of ‘std’ 99 | throw std::runtime_error("Arena: invalid or double free"); | ^~~~~~~~~~~~~ support/lockedpool.cpp:22:1: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’? 21 | #include <algorithm> +++ |+#include <stdexcept> 22 | #ifdef ARENA_DEBUG support/lockedpool.cpp: In member function ‘void LockedPool::free(void*)’: support/lockedpool.cpp:320:16: error: ‘runtime_error’ is not a member of ‘std’ 320 | throw std::runtime_error("LockedPool: invalid address not pointing to any arena"); | ^~~~~~~~~~~~~ support/lockedpool.cpp:320:16: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’? ACKs for top commit: hebasto: ACK fadeb6b103cb441e0e91ef506ef29febabb10715. fanquake: ACK fadeb6b103cb441e0e91ef506ef29febabb10715 - tested this fixes compilation with GCC 13. I don't think theres a need to do anything else here, and that'd also just potentially complicate backporting. Tree-SHA512: 99f79cf385c913138a9cf9fc23be0a3a067b0a28518b8bdc033a7220b85bbc5d18f5356c5bdad2f628c22abb87c18b232724f606eba6326c031518559054be31
Diffstat (limited to 'src')
-rw-r--r--src/support/lockedpool.cpp3
-rw-r--r--src/support/lockedpool.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp
index fb59324f7a..8b05743330 100644
--- a/src/support/lockedpool.cpp
+++ b/src/support/lockedpool.cpp
@@ -19,6 +19,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 03e4e371a3..66fbc218ab 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>
/**