Fix compilation with modern GCC (Ubuntu 24.04+)

Add missing C++ standard library includes required by GCC 13+ and newer
toolchains. These headers were previously included implicitly through
other headers in older GCC versions (e.g., GCC 9 on Ubuntu 20.04), but
modern compilers require explicit includes per C++ standard compliance.

Changes:
- Add <cstdint> to util/bip32.h for uint32_t type definitions
- Add <array> to net_processing.cpp for std::array
- Add <stdexcept> to multiple headers for exception types:
  * support/events.h (std::runtime_error)
  * dbwrapper.h (std::runtime_error base class)
  * streams.h (std::out_of_range, std::ios_base::failure)
  * coins.h (std::logic_error)
  * wallet/coinselection.h (std::invalid_argument, std::out_of_range)
  * rpc/util.h (std::runtime_error)
  * support/lockedpool.h (std::runtime_error)
  * support/lockedpool.cpp (std::runtime_error)
  * wallet/scriptpubkeyman.h (std::runtime_error)

This ensures compatibility across different compiler versions and
architectures (ARM64/x86_64) while maintaining backward compatibility
with older toolchains.

Tested on Ubuntu 24.04 with GCC 13.
This commit is contained in:
2026-01-26 17:30:11 +01:00
parent 5145f76aa9
commit 21ae070217
11 changed files with 15 additions and 1 deletions

View File

@@ -27,6 +27,7 @@
#include <util/system.h>
#include <util/strencodings.h>
#include <array>
#include <memory>
#include <typeinfo>