virtualbox5: fix build errors with gcc 10

Fixes #4106
This commit is contained in:
Christian Prochaska 2021-04-29 10:25:07 +02:00 committed by Norman Feske
parent bc8dbc6b1a
commit d5e7870532
5 changed files with 23 additions and 1 deletions

View File

@ -1 +1 @@
e60d9717f4833b0cba86ddb3b461925d974c5fa1
a4d2f03ac0c0d8f7d7c3a4c3b284a68fb259cbc8

View File

@ -15,6 +15,8 @@
#include <libc/component.h>
#include <util/xml_node.h>
#include <cstdlib>
#include <VBox/settings.h>
#include <SharedClipboard/VBoxClipboard.h>
#include <VBox/HostServices/VBoxClipboardSvc.h>

View File

@ -0,0 +1,15 @@
Fix 'narrowing conversion' error
diff --git a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp
index 3693927..6975ed2 100644
--- a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp
+++ b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp
@@ -5262,7 +5262,7 @@ int Console::i_configNetwork(const char *pszDevice,
{
switch (hrc)
{
- case VERR_ACCESS_DENIED:
+ case E_ACCESSDENIED:
return VMSetError(VMR3GetVM(mpUVM), VERR_HOSTIF_INIT_FAILED, RT_SRC_POS, N_(
"Failed to open '/dev/net/tun' for read/write access. Please check the "
"permissions of that node. Either run 'chmod 0666 /dev/net/tun' or "

View File

@ -37,3 +37,4 @@ vga.patch
register.patch
changeset82265.patch
drvvd.patch
narrowing.patch

View File

@ -19,6 +19,10 @@
#include "sup.h"
#include "vmm.h"
/* stdcxx includes */
#include <cstdio>
#include <cstdlib>
/* VirtualBox includes */
#include <iprt/ldr.h>
#include <iprt/thread.h>