Skip to content

Commit 6bdff42

Browse files
committed
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.
1 parent fc1073b commit 6bdff42

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util/trace.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
#ifndef BITCOIN_UTIL_TRACE_H
66
#define BITCOIN_UTIL_TRACE_H
77

8+
#if defined(HAVE_CONFIG_H)
9+
#include <config/bitcoin-config.h>
10+
#endif
11+
812
#ifdef ENABLE_TRACING
913

1014
#include <sys/sdt.h>

0 commit comments

Comments
 (0)