aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-22 12:20:48 +0200
committerJon Atack <jon@atack.com>2022-03-31 10:38:09 +0200
commitded10fe3eae2ad8058d0cc8f1cee1ad1d34bb507 (patch)
tree6c72ac046e1c30ddfe870ed9dbb44774ade2c842 /src
parent26c2f23f36228e334d17c43a0cb61f76cc545c3d (diff)
downloadbitcoin-ded10fe3eae2ad8058d0cc8f1cee1ad1d34bb507.tar.xz
build: Fix Boost.Process test for Boost 1.78
Github-Pull: bitcoin#24523 Rebased-From: 532c64a
Diffstat (limited to 'src')
-rw-r--r--src/test/system_tests.cpp9
-rw-r--r--src/util/system.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp
index 9c6950f11f..3f5353b5a2 100644
--- a/src/test/system_tests.cpp
+++ b/src/test/system_tests.cpp
@@ -12,7 +12,16 @@
// For details 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
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnarrowing"
+#endif
#include <boost/process.hpp>
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
#endif // ENABLE_EXTERNAL_SIGNER
#include <boost/test/unit_test.hpp>
diff --git a/src/util/system.cpp b/src/util/system.cpp
index aa9122106b..c0f4e8fe4f 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -6,7 +6,16 @@
#include <util/system.h>
#ifdef ENABLE_EXTERNAL_SIGNER
+#if defined(__GNUC__)
+// Boost 1.78 requires the following workaround.
+// See: https://github.com/boostorg/process/issues/235
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnarrowing"
+#endif
#include <boost/process.hpp>
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
#endif // ENABLE_EXTERNAL_SIGNER
#include <chainparamsbase.h>