Merge pull request #2405 from zerotier/jh-fix-openbsd-tap

Build fix for OpenBSD - See ticket #2397
This commit is contained in:
Joseph Henry 2024-11-13 15:12:18 -08:00 committed by GitHub
commit b12dd19d44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -431,6 +431,7 @@ void BSDEthernetTap::threadMain()
// constructing itself.
Thread::sleep(500);
#ifndef __OpenBSD__
bool pinning = _pinning;
for (unsigned int i = 0; i < _concurrency; ++i) {
@ -451,6 +452,7 @@ void BSDEthernetTap::threadMain()
exit(1);
}
}
#endif // __OpenBSD__
uint8_t b[ZT_TAP_BUF_SIZE];
MAC to, from;
@ -497,8 +499,10 @@ void BSDEthernetTap::threadMain()
}
}
}
#ifndef __OpenBSD__
}));
}
#endif // __OpenBSD__
}
} // namespace ZeroTier

View File

@ -140,7 +140,7 @@ std::shared_ptr<EthernetTap> EthernetTap::newInstance(
#endif // __NetBSD__
#ifdef __OpenBSD__
return std::shared_ptr<EthernetTap>(new BSDEthernetTap(homePath,mac,mtu,metric,nwid,friendlyName,handler,arg));
return std::shared_ptr<EthernetTap>(new BSDEthernetTap(homePath,concurrency,pinning,mac,mtu,metric,nwid,friendlyName,handler,arg));
#endif // __OpenBSD__
#endif // ZT_SDK?