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
This commit is contained in:
fanquake 2023-10-23 11:27:00 +01:00 committed by pasta
parent f160e0dbb2
commit f4ea48e623
No known key found for this signature in database
GPG Key ID: E2F3D7916E722D38

View File

@ -5,6 +5,10 @@
#ifndef BITCOIN_UTIL_TRACE_H #ifndef BITCOIN_UTIL_TRACE_H
#define BITCOIN_UTIL_TRACE_H #define BITCOIN_UTIL_TRACE_H
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#ifdef ENABLE_TRACING #ifdef ENABLE_TRACING
#include <sys/sdt.h> #include <sys/sdt.h>