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:
@@ -18,6 +18,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <functional>
|
||||
#include <stdexcept>
|
||||
#include <unordered_map>
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <util/system.h>
|
||||
#include <util/strencodings.h>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <leveldb/db.h>
|
||||
#include <leveldb/write_batch.h>
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <util/system.h>
|
||||
#include <util/strencodings.h>
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <univalue.h>
|
||||
#include <util/check.h>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <assert.h>
|
||||
#include <ios>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <ios>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <event2/event.h>
|
||||
#include <event2/http.h>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#ifdef ARENA_DEBUG
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
#include <stdint.h>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
#include <unordered_map>
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define PALLADIUM_UTIL_BIP32_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <primitives/transaction.h>
|
||||
#include <random.h>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
//! target minimum change amount
|
||||
static constexpr CAmount MIN_CHANGE{COIN / 100};
|
||||
//! final minimum change amount after paying for fees
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <wallet/walletdb.h>
|
||||
#include <wallet/walletutil.h>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <boost/signals2/signal.hpp>
|
||||
|
||||
enum class OutputType;
|
||||
|
||||
Reference in New Issue
Block a user