Skip to content

Commit 67669ab

Browse files
committed
build: Fix Boost Process compatibility with mingw-w64 compiler
Boost 1.71 has a broken compatibility with mingw-w64 compiler due to the added __kernel_entry SAL annotations.
1 parent 333ec8b commit 67669ab

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/test/system_tests.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
#include <univalue.h>
88

99
#ifdef ENABLE_EXTERNAL_SIGNER
10+
#if defined(WIN32) && !defined(__kernel_entry)
11+
// A workaround for boost 1.71 incompatibility with mingw-w64 compiler.
12+
// For details see https://github.com/bitcoin/bitcoin/pull/22348.
13+
#define __kernel_entry
14+
#endif
1015
#include <boost/process.hpp>
1116
#endif // ENABLE_EXTERNAL_SIGNER
1217

src/util/system.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
#include <util/system.h>
77

88
#ifdef ENABLE_EXTERNAL_SIGNER
9+
#if defined(WIN32) && !defined(__kernel_entry)
10+
// A workaround for boost 1.71 incompatibility with mingw-w64 compiler.
11+
// For details see https://github.com/bitcoin/bitcoin/pull/22348.
12+
#define __kernel_entry
13+
#endif
914
#include <boost/process.hpp>
1015
#endif // ENABLE_EXTERNAL_SIGNER
1116

0 commit comments

Comments
 (0)