opnsense-ports/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-client-ConsoleImpl2.cpp
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

36 lines
1.5 KiB
C++

--- src/VBox/Main/src-client/ConsoleImpl2.cpp.orig 2013-09-06 08:30:10.000000000 -0400
+++ src/VBox/Main/src-client/ConsoleImpl2.cpp 2013-09-12 13:03:34.000000000 -0400
@@ -4031,12 +4031,13 @@
}
}
- Assert((int)maTapFD[uInstance] >= 0);
- if ((int)maTapFD[uInstance] >= 0)
+ const int fd = (int)(uintptr_t)maTapFD[uInstance];
+ Assert(fd >= 0);
+ if (fd >= 0)
{
InsertConfigString(pLunL0, "Driver", "HostInterface");
InsertConfigNode(pLunL0, "Config", &pCfg);
- InsertConfigInteger(pCfg, "FileHandle", maTapFD[uInstance]);
+ InsertConfigInteger(pCfg, "FileHandle", fd);
}
#elif defined(VBOX_WITH_NETFLT)
@@ -4230,12 +4231,13 @@
}
}
- Assert((int)maTapFD[uInstance] >= 0);
- if ((int)maTapFD[uInstance] >= 0)
+ const int fd = (int)(uintptr_t)maTapFD[uInstance];
+ Assert(fd >= 0);
+ if (fd >= 0)
{
InsertConfigString(pLunL0, "Driver", "HostInterface");
InsertConfigNode(pLunL0, "Config", &pCfg);
- InsertConfigInteger(pCfg, "FileHandle", maTapFD[uInstance]);
+ InsertConfigInteger(pCfg, "FileHandle", fd);
}
break;
}