From f4ea48e623b8a8b70ef981d23607c98d0256462e Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 23 Oct 2023 11:27:00 +0100 Subject: [PATCH] Merge bitcoin/bitcoin#28693: build: Include `config/bitcoin-config.h` explicitly in `util/trace.h` 6bdff429ec17eae4138c3af1e21de3ec46f4ab13 build: Include `config/bitcoin-config.h` explicitly in `util/trace.h` (Hennadii Stepanov) Pull request description: The `ENABLE_TRACING` macro is expected to be defined in the `config/bitcoin-config.h` header. Therefore, the current code is error-prone as it depends on whether the `config/bitcoin-config.h` header was included before or not. This bug was noticed while working on CMake [stuff](https://github.com/hebasto/bitcoin/pull/37). ACKs for top commit: fanquake: ACK 6bdff429ec17eae4138c3af1e21de3ec46f4ab13 Tree-SHA512: 22c4fdeb51628814050eb99a83db4268a4f3106207eeef918a07214bbc52f2b22490f6b05fcb96216f147afa4197c51102503738131e2583e750b6d195747a49 --- src/util/trace.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/trace.h b/src/util/trace.h index 9c92cb10e7..f25ad42471 100644 --- a/src/util/trace.h +++ b/src/util/trace.h @@ -5,6 +5,10 @@ #ifndef BITCOIN_UTIL_TRACE_H #define BITCOIN_UTIL_TRACE_H +#if defined(HAVE_CONFIG_H) +#include +#endif + #ifdef ENABLE_TRACING #include