From d34481d8303e50688e5943df407df58221e6781c Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 17 Sep 2024 11:04:01 -0700 Subject: [PATCH] Fix build error for BSD tap driver --- osdep/BSDEthernetTap.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osdep/BSDEthernetTap.cpp b/osdep/BSDEthernetTap.cpp index 1a240c1a1..d4dbf7f6f 100644 --- a/osdep/BSDEthernetTap.cpp +++ b/osdep/BSDEthernetTap.cpp @@ -431,10 +431,12 @@ void BSDEthernetTap::threadMain() // constructing itself. Thread::sleep(500); + bool pinning = _pinning; + for (unsigned int i = 0; i < _concurrency; ++i) { - _rxThreads.push_back(std::thread([this, i, _pinning] { + _rxThreads.push_back(std::thread([this, i, pinning] { - if (_pinning) { + if (pinning) { int pinCore = i % _concurrency; fprintf(stderr, "Pinning thread %d to core %d\n", i, pinCore); pthread_t self = pthread_self();