From 96647a898d62d699808316238dfb933d960413f2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 00:55:46 +0200 Subject: Merging upstream version 7.0.16-dfsg. Signed-off-by: Daniel Baumann --- src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c | 12 ++++++++---- .../common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp | 3 +++ src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src/VBox/Additions/common/VBoxGuest') diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c index 538a0bc4..499ad791 100644 --- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c +++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c @@ -79,6 +79,7 @@ #include #include #include +#include /********************************************************************************************************************************* @@ -661,6 +662,10 @@ static int __init vgdrvLinuxModInit(void) PRTLOGGER pRelLogger; int rc; + /* Check if modue loading was disabled. */ + if (!vbox_mod_should_load()) + return -EINVAL; + /* * Initialize IPRT first. */ @@ -1361,8 +1366,7 @@ static int vgdrvLinuxParamLogGrpSet(const char *pszValue, CONST_4_15 struct kern RTLogGroupSettings(pLogger, pszValue); } else if (pParam->name[0] != 'd') - strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp)); - + RTStrCopy(&g_szLogGrp[0], sizeof(g_szLogGrp), pszValue); return 0; } @@ -1387,7 +1391,7 @@ static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, CONST_4_15 struct ke RTLogFlags(pLogger, pszValue); } else if (pParam->name[0] != 'd') - strlcpy(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags)); + RTStrCopy(&g_szLogFlags[0], sizeof(g_szLogFlags), pszValue); return 0; } @@ -1412,7 +1416,7 @@ static int vgdrvLinuxParamLogDstSet(const char *pszValue, CONST_4_15 struct kern RTLogDestinations(pLogger, pszValue); } else if (pParam->name[0] != 'd') - strlcpy(&g_szLogDst[0], pszValue, sizeof(g_szLogDst)); + RTStrCopy(&g_szLogDst[0], sizeof(g_szLogDst), pszValue); return 0; } diff --git a/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp b/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp index 8a9d15c0..899cb903 100644 --- a/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp +++ b/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp @@ -46,6 +46,9 @@ #if defined(VBOX_VBGLR3_XFREE86) extern "C" { # define XFree86LOADER +# if RT_GNUC_PREREQ(13,0) /* cmath gets dragged in and the c++/13/cmath header is allergic to -ffreestanding. */ +# define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +# endif # include # undef size_t } diff --git a/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest b/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest index 5df520b6..4e7e5f59 100755 --- a/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest +++ b/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest @@ -95,6 +95,7 @@ FILES_VBOXGUEST_NOBIN=" \ ${PATH_ROOT}/include/VBox/VBoxGuestLib.h=>include/VBox/VBoxGuestLib.h \ ${PATH_ROOT}/include/VBox/VBoxGuestMangling.h=>include/VBox/VBoxGuestMangling.h \ ${PATH_ROOT}/include/VBox/version.h=>include/VBox/version.h \ + ${PATH_ROOT}/include/VBox/VBoxLnxModInline.h=>VBox/VBoxLnxModInline.h \ ${PATH_ROOT}/include/VBox/HostServices/GuestPropertySvc.h=>include/VBox/HostServices/GuestPropertySvc.h \ ${PATH_ROOT}/include/VBox/vmm/cpuidcall.h=>include/VBox/vmm/cpuidcall.h \ ${PATH_ROOT}/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp=>VBoxGuest-common.c \ -- cgit v1.2.3