From 67669ab425b52a2b6be3d2f3b3b7e3939b676a2c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 27 Jun 2021 10:17:27 +0300 Subject: [PATCH] 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. --- src/test/system_tests.cpp | 5 +++++ src/util/system.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index 940145b84fb..e97eab2c00f 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -7,6 +7,11 @@ #include #ifdef ENABLE_EXTERNAL_SIGNER +#if defined(WIN32) && !defined(__kernel_entry) +// A workaround for boost 1.71 incompatibility with mingw-w64 compiler. +// For details see https://github.com/bitcoin/bitcoin/pull/22348. +#define __kernel_entry +#endif #include #endif // ENABLE_EXTERNAL_SIGNER diff --git a/src/util/system.cpp b/src/util/system.cpp index ee7a76be292..258ba2f2355 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -6,6 +6,11 @@ #include #ifdef ENABLE_EXTERNAL_SIGNER +#if defined(WIN32) && !defined(__kernel_entry) +// A workaround for boost 1.71 incompatibility with mingw-w64 compiler. +// For details see https://github.com/bitcoin/bitcoin/pull/22348. +#define __kernel_entry +#endif #include #endif // ENABLE_EXTERNAL_SIGNER