diff --git a/configure.ac b/configure.ac index d485d335ab..8f72d513a8 100644 --- a/configure.ac +++ b/configure.ac @@ -1545,6 +1545,14 @@ if test "$use_external_signer" != "no"; then dnl Boost 1.73 and older require the following workaround. LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + // Boost 1.77 requires the following workaround. + // See: https://github.com/boostorg/process/issues/213 + #include + #if defined(WIN32) && !defined(__kernel_entry) + // Boost 1.71-1.77 requires the following workaround for compatibility with mingw-w64 compiler. + // See: https://github.com/bitcoin/bitcoin/pull/22348 + #define __kernel_entry + #endif #define BOOST_PROCESS_USE_STD_FS #include diff --git a/src/common/run_command.cpp b/src/common/run_command.cpp index 4b1fb44f3d..d4ebd22969 100644 --- a/src/common/run_command.cpp +++ b/src/common/run_command.cpp @@ -12,6 +12,16 @@ #include #ifdef ENABLE_EXTERNAL_SIGNER +// Boost 1.77 requires the following workaround. +// See: https://github.com/boostorg/process/issues/213 +#include + +#if defined(WIN32) && !defined(__kernel_entry) +// Boost 1.71-1.77 requires the following workaround for compatibility with mingw-w64 compiler. +// See: https://github.com/bitcoin/bitcoin/pull/22348 +#define __kernel_entry +#endif + #include #endif // ENABLE_EXTERNAL_SIGNER diff --git a/src/common/run_command.h b/src/common/run_command.h index 2a52649bbf..59db9de273 100644 --- a/src/common/run_command.h +++ b/src/common/run_command.h @@ -18,6 +18,14 @@ #include #ifdef FD_CLOEXEC #include +// Boost 1.77 requires the following workaround. +// See: https://github.com/boostorg/process/issues/213 +#include +#if defined(WIN32) && !defined(__kernel_entry) +// Boost 1.71-1.77 requires the following workaround for compatibility with mingw-w64 compiler. +// See: https://github.com/bitcoin/bitcoin/pull/22348 +#define __kernel_entry +#endif #if defined(__GNUC__) // Boost 1.78 requires the following workaround. // See: https://github.com/boostorg/process/issues/235 diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index 90fce9adf9..be9f9275ae 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -11,6 +11,16 @@ #include #ifdef ENABLE_EXTERNAL_SIGNER +// Boost 1.77 requires the following workaround. +// See: https://github.com/boostorg/process/issues/213 +#include + +#if defined(WIN32) && !defined(__kernel_entry) +// Boost 1.71-1.77 requires the following workaround for compatibility with mingw-w64 compiler. +// See: https://github.com/bitcoin/bitcoin/pull/22348 +#define __kernel_entry +#endif + #include #endif // ENABLE_EXTERNAL_SIGNER