From 5e854e505fefa9d08836f8b36a9f50a4a54a867c Mon Sep 17 00:00:00 2001
From: "A. Maitland Bottoms" <bottoms@debian.org>
Date: Sun, 6 Dec 2020 15:21:25 -0500
Subject: [PATCH] LTS use boost placeholder namespace

Needed to build against boost 1.74.
---
 host/examples/rfnoc_rx_to_file.cpp                     | 3 +++
 host/lib/experts/expert_container.cpp                  | 3 +++
 host/lib/include/uhdlib/experts/expert_factory.hpp     | 3 +++
 host/lib/rfnoc/block_ctrl_base.cpp                     | 3 +++
 host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp            | 3 +++
 host/lib/rfnoc/legacy_compat.cpp                       | 3 +++
 host/lib/rfnoc/nocscript/block_iface.cpp               | 3 +++
 host/lib/rfnoc/nocscript/parser.cpp                    | 3 +++
 host/lib/rfnoc/rate_node_ctrl.cpp                      | 3 +++
 host/lib/rfnoc/scalar_node_ctrl.cpp                    | 3 +++
 host/lib/transport/libusb1_zero_copy.cpp               | 3 +++
 host/lib/usrp/b100/b100_impl.cpp                       | 3 +++
 host/lib/usrp/b100/io_impl.cpp                         | 3 +++
 host/lib/usrp/b200/b200_iface.cpp                      | 3 +++
 host/lib/usrp/b200/b200_impl.cpp                       | 3 +++
 host/lib/usrp/b200/b200_io_impl.cpp                    | 3 +++
 host/lib/usrp/cores/rx_dsp_core_3000.cpp               | 4 ++++
 host/lib/usrp/cores/rx_frontend_core_200.cpp           | 3 +++
 host/lib/usrp/cores/rx_frontend_core_3000.cpp          | 3 +++
 host/lib/usrp/cores/tx_dsp_core_3000.cpp               | 3 +++
 host/lib/usrp/cores/tx_frontend_core_200.cpp           | 3 +++
 host/lib/usrp/dboard/db_cbx.cpp                        | 3 +++
 host/lib/usrp/dboard/db_dbsrx.cpp                      | 3 +++
 host/lib/usrp/dboard/db_dbsrx2.cpp                     | 3 +++
 host/lib/usrp/dboard/db_rfx.cpp                        | 3 +++
 host/lib/usrp/dboard/db_sbx_common.cpp                 | 3 +++
 host/lib/usrp/dboard/db_sbx_version3.cpp               | 3 +++
 host/lib/usrp/dboard/db_sbx_version4.cpp               | 3 +++
 host/lib/usrp/dboard/db_tvrx.cpp                       | 3 +++
 host/lib/usrp/dboard/db_tvrx2.cpp                      | 3 +++
 host/lib/usrp/dboard/db_ubx.cpp                        | 3 +++
 host/lib/usrp/dboard/db_wbx_common.cpp                 | 3 +++
 host/lib/usrp/dboard/db_wbx_simple.cpp                 | 3 +++
 host/lib/usrp/dboard/db_wbx_version2.cpp               | 3 +++
 host/lib/usrp/dboard/db_wbx_version3.cpp               | 3 +++
 host/lib/usrp/dboard/db_wbx_version4.cpp               | 3 +++
 host/lib/usrp/dboard/db_xcvr2450.cpp                   | 3 +++
 host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp | 3 +++
 host/lib/usrp/multi_usrp.cpp                           | 3 +++
 host/lib/usrp/n230/n230_impl.cpp                       | 3 +++
 host/lib/usrp/n230/n230_stream_manager.cpp             | 3 +++
 host/lib/usrp/usrp1/io_impl.cpp                        | 3 +++
 host/lib/usrp/usrp1/usrp1_impl.cpp                     | 3 +++
 host/lib/usrp/usrp2/io_impl.cpp                        | 3 +++
 host/lib/usrp/usrp2/usrp2_impl.cpp                     | 3 +++
 host/lib/usrp/x300/x300_radio_ctrl_impl.cpp            | 3 +++
 host/lib/usrp_clock/octoclock/octoclock_impl.cpp       | 3 +++
 host/lib/utils/gain_group.cpp                          | 3 +++
 host/tests/gain_group_test.cpp                         | 3 +++
 host/tests/nocscript_expr_test.cpp                     | 4 ++++
 host/tests/nocscript_ftable_test.cpp                   | 4 ++++
 host/tests/nocscript_parser_test.cpp                   | 4 ++++
 host/tests/property_test.cpp                           | 4 ++++
 53 files changed, 164 insertions(+)

diff --git a/host/examples/rfnoc_rx_to_file.cpp b/host/examples/rfnoc_rx_to_file.cpp
index cbd35cbe8..8c60d0a1b 100644
--- a/host/examples/rfnoc_rx_to_file.cpp
+++ b/host/examples/rfnoc_rx_to_file.cpp
@@ -34,6 +34,9 @@
 #include <thread>
 
 namespace po = boost::program_options;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 const int64_t UPDATE_INTERVAL = 1; // 1 second update interval for BW summary
 
diff --git a/host/lib/experts/expert_container.cpp b/host/lib/experts/expert_container.cpp
index 91cb28818..f348ebe0d 100644
--- a/host/lib/experts/expert_container.cpp
+++ b/host/lib/experts/expert_container.cpp
@@ -302,6 +302,9 @@ protected:
         }
 
         try {
+#if (BOOST_VERSION >= 106000)
+            using namespace boost::placeholders;
+#endif
             // Add a vertex in this graph for the data node
             expert_graph_t::vertex_descriptor gr_node =
                 boost::add_vertex(data_node, _expert_dag);
diff --git a/host/lib/include/uhdlib/experts/expert_factory.hpp b/host/lib/include/uhdlib/experts/expert_factory.hpp
index e142f8948..e54825aa3 100644
--- a/host/lib/include/uhdlib/experts/expert_factory.hpp
+++ b/host/lib/include/uhdlib/experts/expert_factory.hpp
@@ -15,6 +15,9 @@
 #include <boost/bind.hpp>
 #include <memory>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 namespace uhd { namespace experts {
 
 /*!
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp
index 7ef5a6bf1..8ad7bfd43 100644
--- a/host/lib/rfnoc/block_ctrl_base.cpp
+++ b/host/lib/rfnoc/block_ctrl_base.cpp
@@ -25,6 +25,9 @@
 using namespace uhd;
 using namespace uhd::rfnoc;
 using std::string;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * Structors
diff --git a/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp
index b78635002..2c10ccbc3 100644
--- a/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp
+++ b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp
@@ -18,6 +18,9 @@
 
 using namespace uhd;
 using namespace uhd::rfnoc;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 class dma_fifo_block_ctrl_impl : public dma_fifo_block_ctrl
 {
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp
index f93fe871a..289a647e3 100644
--- a/host/lib/rfnoc/legacy_compat.cpp
+++ b/host/lib/rfnoc/legacy_compat.cpp
@@ -25,6 +25,9 @@
 
 #define UHD_LEGACY_LOG() UHD_LOGGER_TRACE("RFNOC")
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 using namespace uhd::rfnoc;
 using uhd::stream_cmd_t;
 using uhd::usrp::subdev_spec_pair_t;
diff --git a/host/lib/rfnoc/nocscript/block_iface.cpp b/host/lib/rfnoc/nocscript/block_iface.cpp
index f029c3324..19d28117d 100644
--- a/host/lib/rfnoc/nocscript/block_iface.cpp
+++ b/host/lib/rfnoc/nocscript/block_iface.cpp
@@ -17,6 +17,9 @@
 
 using namespace uhd::rfnoc;
 using namespace uhd::rfnoc::nocscript;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 block_iface::block_iface(block_ctrl_base* block_ptr) : _block_ptr(block_ptr)
 {
diff --git a/host/lib/rfnoc/nocscript/parser.cpp b/host/lib/rfnoc/nocscript/parser.cpp
index 0212de8b1..d8d509b04 100644
--- a/host/lib/rfnoc/nocscript/parser.cpp
+++ b/host/lib/rfnoc/nocscript/parser.cpp
@@ -17,6 +17,9 @@
 
 using namespace uhd::rfnoc::nocscript;
 namespace lex = boost::spirit::lex;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 class parser_impl : public parser
 {
diff --git a/host/lib/rfnoc/rate_node_ctrl.cpp b/host/lib/rfnoc/rate_node_ctrl.cpp
index 08abf4f78..f93fe5ec9 100644
--- a/host/lib/rfnoc/rate_node_ctrl.cpp
+++ b/host/lib/rfnoc/rate_node_ctrl.cpp
@@ -8,6 +8,9 @@
 #include <uhd/rfnoc/rate_node_ctrl.hpp>
 #include <boost/bind.hpp>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 using namespace uhd::rfnoc;
 
 const double rate_node_ctrl::RATE_UNDEFINED = -1.0;
diff --git a/host/lib/rfnoc/scalar_node_ctrl.cpp b/host/lib/rfnoc/scalar_node_ctrl.cpp
index f197da0b5..68e1fe3da 100644
--- a/host/lib/rfnoc/scalar_node_ctrl.cpp
+++ b/host/lib/rfnoc/scalar_node_ctrl.cpp
@@ -8,6 +8,9 @@
 #include <uhd/rfnoc/scalar_node_ctrl.hpp>
 #include <boost/bind.hpp>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 using namespace uhd::rfnoc;
 
 const double scalar_node_ctrl::SCALE_UNDEFINED = -1.0;
diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp
index f5693b198..67328571f 100644
--- a/host/lib/transport/libusb1_zero_copy.cpp
+++ b/host/lib/transport/libusb1_zero_copy.cpp
@@ -27,6 +27,9 @@
 #    include <vector>
 #endif
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 using namespace uhd;
 using namespace uhd::transport;
 
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index 41c32bed9..bed8bf7e7 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -24,6 +24,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 namespace {
 constexpr uint16_t B100_VENDOR_ID          = 0x2500;
diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp
index ac0d2d077..ef16cf82b 100644
--- a/host/lib/usrp/b100/io_impl.cpp
+++ b/host/lib/usrp/b100/io_impl.cpp
@@ -18,6 +18,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 void b100_impl::update_rates(void)
 {
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp
index cb5293200..6215e6c4b 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -32,6 +32,9 @@
 
 using namespace uhd;
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 static const bool load_img_msg = true;
 
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 211d18094..b444c8bab 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -33,6 +33,9 @@ using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::usrp::gpio_atr;
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 namespace {
 constexpr int64_t REENUMERATION_TIMEOUT_MS = 3000;
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index 5a0de430f..735852fa7 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -19,6 +19,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * update streamer rates
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index ff7caf105..64d83e546 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -19,6 +19,10 @@
 #include <algorithm>
 #include <cmath>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
+
 #define REG_DSP_RX_FREQ _dsp_base + 0
 #define REG_DSP_RX_SCALE_IQ _dsp_base + 4
 #define REG_DSP_RX_DECIM _dsp_base + 8
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp
index 9d98d698b..64adce332 100644
--- a/host/lib/usrp/cores/rx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp
@@ -11,6 +11,9 @@
 #include <boost/math/special_functions/round.hpp>
 
 using namespace uhd;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 #define REG_RX_FE_SWAP_IQ _base + 0 // lower bit
 #define REG_RX_FE_MAG_CORRECTION _base + 4 // 18 bits
diff --git a/host/lib/usrp/cores/rx_frontend_core_3000.cpp b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
index 7f88a3e98..76d0a8ccd 100644
--- a/host/lib/usrp/cores/rx_frontend_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
@@ -15,6 +15,9 @@
 #include <boost/math/special_functions/round.hpp>
 
 using namespace uhd;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 #define REG_RX_FE_MAG_CORRECTION (_base + 0) // 18 bits
 #define REG_RX_FE_PHASE_CORRECTION (_base + 4) // 18 bits
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
index b76a74b1c..36271fca2 100644
--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
@@ -29,6 +29,9 @@ T ceil_log2(T num)
 }
 
 using namespace uhd;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 const double tx_dsp_core_3000::DEFAULT_CORDIC_FREQ = 0.0;
 const double tx_dsp_core_3000::DEFAULT_RATE        = 1e6;
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp
index 5b7fc25c8..d9ee47fc3 100644
--- a/host/lib/usrp/cores/tx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp
@@ -14,6 +14,9 @@
 #include <boost/math/special_functions/round.hpp>
 
 using namespace uhd;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 #define REG_TX_FE_DC_OFFSET_I _base + 0 // 24 bits
 #define REG_TX_FE_DC_OFFSET_Q _base + 4 // 24 bits
diff --git a/host/lib/usrp/dboard/db_cbx.cpp b/host/lib/usrp/dboard/db_cbx.cpp
index 788c58063..7fbf3ace3 100644
--- a/host/lib/usrp/dboard/db_cbx.cpp
+++ b/host/lib/usrp/dboard/db_cbx.cpp
@@ -13,6 +13,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * Structors
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 6d687296e..2fdc21f33 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -31,6 +31,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * The DBSRX constants
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp
index 7bcb2f04c..ea974f383 100644
--- a/host/lib/usrp/dboard/db_dbsrx2.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx2.cpp
@@ -27,6 +27,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * The DBSRX2 constants
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index a2c337ad5..d4f136735 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -41,6 +41,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * The RFX Series constants
diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp
index 9189eb96c..8651c48ea 100644
--- a/host/lib/usrp/dboard/db_sbx_common.cpp
+++ b/host/lib/usrp/dboard/db_sbx_common.cpp
@@ -11,6 +11,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 
 /***********************************************************************
diff --git a/host/lib/usrp/dboard/db_sbx_version3.cpp b/host/lib/usrp/dboard/db_sbx_version3.cpp
index 88f07a8f4..8288ac2ec 100644
--- a/host/lib/usrp/dboard/db_sbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_sbx_version3.cpp
@@ -14,6 +14,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * Structors
diff --git a/host/lib/usrp/dboard/db_sbx_version4.cpp b/host/lib/usrp/dboard/db_sbx_version4.cpp
index 33a1e8b9e..0a1300337 100644
--- a/host/lib/usrp/dboard/db_sbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_sbx_version4.cpp
@@ -14,6 +14,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * Structors
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index f2c795eee..6b4a640c3 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -41,6 +41,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * The tvrx constants
diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp
index 31d66898c..fe16a018b 100644
--- a/host/lib/usrp/dboard/db_tvrx2.cpp
+++ b/host/lib/usrp/dboard/db_tvrx2.cpp
@@ -66,6 +66,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * The TVRX2 types
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index 97a276fa6..d446e07d6 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -30,6 +30,9 @@
 
 using namespace uhd;
 using namespace uhd::usrp;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * UBX Data Structures
diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp
index 1c28492b3..96d13e70b 100644
--- a/host/lib/usrp/dboard/db_wbx_common.cpp
+++ b/host/lib/usrp/dboard/db_wbx_common.cpp
@@ -17,6 +17,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 
 /***********************************************************************
diff --git a/host/lib/usrp/dboard/db_wbx_simple.cpp b/host/lib/usrp/dboard/db_wbx_simple.cpp
index f148e668b..b1fc482f1 100644
--- a/host/lib/usrp/dboard/db_wbx_simple.cpp
+++ b/host/lib/usrp/dboard/db_wbx_simple.cpp
@@ -23,6 +23,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 
 /***********************************************************************
diff --git a/host/lib/usrp/dboard/db_wbx_version2.cpp b/host/lib/usrp/dboard/db_wbx_version2.cpp
index 4c0f8bb2e..32c193490 100644
--- a/host/lib/usrp/dboard/db_wbx_version2.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version2.cpp
@@ -23,6 +23,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 
 /***********************************************************************
diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp
index 2dbd5bb3e..dbd8dfb2b 100644
--- a/host/lib/usrp/dboard/db_wbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version3.cpp
@@ -22,6 +22,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 
 /***********************************************************************
diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp
index eb9ec786d..f87f0fd54 100644
--- a/host/lib/usrp/dboard/db_wbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version4.cpp
@@ -22,6 +22,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 
 /***********************************************************************
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index 24e4ba64d..86fa0f76f 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -61,6 +61,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace boost::assign;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * The XCVR 2450 constants
diff --git a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp
index d9ddf40ef..8e0252bf9 100644
--- a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp
@@ -18,6 +18,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::rfnoc;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 namespace {
 const size_t SR_ANTENNA_GAIN_BASE = 204;
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 9a7acfda1..b93c69a0c 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -32,6 +32,9 @@
 
 using namespace uhd;
 using namespace uhd::usrp;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 const size_t multi_usrp::ALL_MBOARDS    = size_t(~0);
 const size_t multi_usrp::ALL_CHANS      = size_t(~0);
diff --git a/host/lib/usrp/n230/n230_impl.cpp b/host/lib/usrp/n230/n230_impl.cpp
index 55aa917e0..54244a34e 100644
--- a/host/lib/usrp/n230/n230_impl.cpp
+++ b/host/lib/usrp/n230/n230_impl.cpp
@@ -38,6 +38,9 @@ namespace uhd { namespace usrp { namespace n230 {
 
 using namespace uhd::transport;
 namespace asio = boost::asio;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 //----------------------------------------------------------
 // Static device registration with framework
diff --git a/host/lib/usrp/n230/n230_stream_manager.cpp b/host/lib/usrp/n230/n230_stream_manager.cpp
index 8e92b4694..438849482 100644
--- a/host/lib/usrp/n230/n230_stream_manager.cpp
+++ b/host/lib/usrp/n230/n230_stream_manager.cpp
@@ -27,6 +27,9 @@ static const uint32_t N230_EVENT_CODE_FLOW_CTRL = 0;
 namespace uhd { namespace usrp { namespace n230 {
 
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 n230_stream_manager::~n230_stream_manager() {}
 
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 1371fb805..d92285eae 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -49,6 +49,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 static const size_t alignment_padding = 512;
 
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index cb5afae51..7ee0f9e72 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -24,6 +24,9 @@
 using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::transport;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 namespace {
 constexpr uint16_t USRP1_VENDOR_ID         = 0xfffe;
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 01d5bede3..67d67f2c0 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -33,6 +33,9 @@ using namespace uhd::usrp;
 using namespace uhd::transport;
 namespace asio = boost::asio;
 namespace pt   = boost::posix_time;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * helpers
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 8ccb02935..4c5beff07 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -25,6 +25,9 @@ using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::transport;
 namespace asio = boost::asio;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 // A reasonable number of frames for send/recv and async/sync
 static const size_t DEFAULT_NUM_FRAMES = 32;
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
index 8cb80282b..6d4d4c52f 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -28,6 +28,9 @@ using namespace uhd;
 using namespace uhd::usrp;
 using namespace uhd::rfnoc;
 using namespace uhd::usrp::x300;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 static const size_t IO_MASTER_RADIO = 0;
 
diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
index 526eb026a..50a8584c1 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
@@ -31,6 +31,9 @@ using namespace uhd::usrp_clock;
 using namespace uhd::transport;
 namespace asio = boost::asio;
 namespace fs   = boost::filesystem;
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 
 /***********************************************************************
  * Discovery
diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp
index 0006ac9ea..c4d5763f4 100644
--- a/host/lib/utils/gain_group.cpp
+++ b/host/lib/utils/gain_group.cpp
@@ -14,6 +14,9 @@
 #include <algorithm>
 #include <vector>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 using namespace uhd;
 
 static bool compare_by_step_size(
diff --git a/host/tests/gain_group_test.cpp b/host/tests/gain_group_test.cpp
index 2608f292d..6a014b593 100644
--- a/host/tests/gain_group_test.cpp
+++ b/host/tests/gain_group_test.cpp
@@ -13,6 +13,9 @@
 
 #define rint(x) boost::math::iround(x)
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
 using namespace uhd;
 
 /***********************************************************************
diff --git a/host/tests/nocscript_expr_test.cpp b/host/tests/nocscript_expr_test.cpp
index ed5f6598d..20b7fbfd7 100644
--- a/host/tests/nocscript_expr_test.cpp
+++ b/host/tests/nocscript_expr_test.cpp
@@ -15,6 +15,10 @@
 #include <algorithm>
 #include <iostream>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
+
 // We need this global variable for one of the later tests
 int and_counter = 0;
 
diff --git a/host/tests/nocscript_ftable_test.cpp b/host/tests/nocscript_ftable_test.cpp
index 36aa314f2..7fafc4acf 100644
--- a/host/tests/nocscript_ftable_test.cpp
+++ b/host/tests/nocscript_ftable_test.cpp
@@ -14,6 +14,10 @@
 #include <algorithm>
 #include <iostream>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
+
 BOOST_AUTO_TEST_CASE(test_basic_funcs)
 {
     function_table::sptr ft = function_table::make();
diff --git a/host/tests/nocscript_parser_test.cpp b/host/tests/nocscript_parser_test.cpp
index eb9352995..639ac39e6 100644
--- a/host/tests/nocscript_parser_test.cpp
+++ b/host/tests/nocscript_parser_test.cpp
@@ -17,6 +17,10 @@
 #include <algorithm>
 #include <iostream>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
+
 const int SPP_VALUE = 64;
 
 // Need those for the variable testing:
diff --git a/host/tests/property_test.cpp b/host/tests/property_test.cpp
index 907ca9f73..7ac9f96a6 100644
--- a/host/tests/property_test.cpp
+++ b/host/tests/property_test.cpp
@@ -12,6 +12,10 @@
 #include <exception>
 #include <iostream>
 
+#if (BOOST_VERSION >= 106000)
+using namespace boost::placeholders;
+#endif
+
 struct coercer_type
 {
     int doit(int x)
-- 
2.20.1

