aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-10-20 14:15:52 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-10-20 14:40:26 +0100
commit6bdff429ec17eae4138c3af1e21de3ec46f4ab13 (patch)
treed46228c83de22e12422333865fb9803f14f171f1 /src/util
parentfc1073bb450d67d5229123bd9bd9a0c1f4dc7cd3 (diff)
downloadbitcoin-6bdff429ec17eae4138c3af1e21de3ec46f4ab13.tar.xz
build: Include `config/bitcoin-config.h` explicitly in `util/trace.h`
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.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/trace.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/trace.h b/src/util/trace.h
index 051921a0d2..1fe743f043 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 <config/bitcoin-config.h>
+#endif
+
#ifdef ENABLE_TRACING
#include <sys/sdt.h>