OpenBSD fixes, workaround for apparent libstdc++ bug.

This commit is contained in:
Adam Ierymenko 2017-01-19 15:05:26 -08:00
parent 7b231b38b0
commit d79f792e6f
4 changed files with 40 additions and 30 deletions

View file

@ -83,7 +83,6 @@ BSDEthernetTap::BSDEthernetTap(
{
static Mutex globalTapCreateLock;
char devpath[64],ethaddr[64],mtustr[32],metstr[32],tmpdevname[32];
struct stat stattmp;
Mutex::Lock _gl(globalTapCreateLock);
@ -122,6 +121,7 @@ BSDEthernetTap::BSDEthernetTap(
::waitpid(cpid,&exitcode,0);
} else throw std::runtime_error("fork() failed");
struct stat stattmp;
if (!stat(devpath,&stattmp)) {
cpid = (long)vfork();
if (cpid == 0) {