Skip to content

Commit 532c64a

Browse files
hebastopromag
authored andcommitted
build: Fix Boost.Process test for Boost 1.78
1 parent c109e7d commit 532c64a

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

configure.ac

+5
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,10 @@ if test "$use_external_signer" != "no"; then
14461446
;;
14471447
*)
14481448
AC_MSG_CHECKING([whether Boost.Process can be used])
1449+
TEMP_CXXFLAGS="$CXXFLAGS"
1450+
dnl Boost 1.78 requires the following workaround.
1451+
dnl See: https://github.com/boostorg/process/issues/235
1452+
CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
14491453
TEMP_CPPFLAGS="$CPPFLAGS"
14501454
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
14511455
TEMP_LDFLAGS="$LDFLAGS"
@@ -1456,6 +1460,7 @@ if test "$use_external_signer" != "no"; then
14561460
[have_boost_process="no"])
14571461
LDFLAGS="$TEMP_LDFLAGS"
14581462
CPPFLAGS="$TEMP_CPPFLAGS"
1463+
CXXFLAGS="$TEMP_CXXFLAGS"
14591464
AC_MSG_RESULT([$have_boost_process])
14601465
if test "$have_boost_process" = "yes"; then
14611466
use_external_signer="yes"

src/test/system_tests.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@
1212
// For details see https://github.com/bitcoin/bitcoin/pull/22348.
1313
#define __kernel_entry
1414
#endif
15+
#if defined(__GNUC__)
16+
// Boost 1.78 requires the following workaround.
17+
// See: https://github.com/boostorg/process/issues/235
18+
#pragma GCC diagnostic push
19+
#pragma GCC diagnostic ignored "-Wnarrowing"
20+
#endif
1521
#include <boost/process.hpp>
22+
#if defined(__GNUC__)
23+
#pragma GCC diagnostic pop
24+
#endif
1625
#endif // ENABLE_EXTERNAL_SIGNER
1726

1827
#include <boost/test/unit_test.hpp>

src/util/system.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
#include <util/system.h>
77

88
#ifdef ENABLE_EXTERNAL_SIGNER
9+
#if defined(__GNUC__)
10+
// Boost 1.78 requires the following workaround.
11+
// See: https://github.com/boostorg/process/issues/235
12+
#pragma GCC diagnostic push
13+
#pragma GCC diagnostic ignored "-Wnarrowing"
14+
#endif
915
#include <boost/process.hpp>
16+
#if defined(__GNUC__)
17+
#pragma GCC diagnostic pop
18+
#endif
1019
#endif // ENABLE_EXTERNAL_SIGNER
1120

1221
#include <chainparamsbase.h>

0 commit comments

Comments
 (0)