diff options
Diffstat (limited to 'emulators/virtualbox-ose-legacy/files')
5 files changed, 123 insertions, 9 deletions
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk index 4d327e1089b1..270472c045e3 100644 --- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk @@ -1,6 +1,6 @@ ---- src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk.orig 2018-11-29 19:03:21 UTC +--- src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk.orig 2025-05-11 03:54:13 UTC +++ src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk -@@ -0,0 +1,23 @@ +@@ -0,0 +1,28 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the FreeBSD Shared folder mount utility. @@ -19,8 +19,13 @@ + +PROGRAMS += mount_vboxvfs +mount_vboxvfs_TEMPLATE = NewVBoxGuestR3Exe -+mount_vboxvfs_SOURCES = $(MOUNT)/getmntopts.c \ -+ mount_vboxvfs.c ++mount_vboxvfs_SOURCES = mount_vboxvfs.c ++ ++ifdef HAVE_MNTOPTS_IN_LIBUTIL ++mount_vboxvfs_LIBS = util ++else ++mount_vboxvfs_SOURCES += $(MOUNT)/getmntopts.c ++endif + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp new file mode 100644 index 000000000000..055a29c732a9 --- /dev/null +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp @@ -0,0 +1,47 @@ +--- src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp.orig 2020-07-09 16:55:07 UTC ++++ src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp +@@ -1094,7 +1094,7 @@ int vmsvga3dTerminate(PVGASTATE pThis) + RTSemEventDestroy(pState->WndRequestSem); + #elif defined(RT_OS_DARWIN) + +-#elif defined(RT_OS_LINUX) ++#elif defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) + /* signal to the thread that it is supposed to exit */ + pState->bTerminate = true; + /* wait for it to terminate */ +@@ -3200,7 +3200,7 @@ int vmsvga3dCommandPresent(PVGASTATE pThis, uint32_t s + return VINF_SUCCESS; + } + +-#ifdef RT_OS_LINUX ++#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) + /** + * X11 event handling thread. + * +@@ -3230,7 +3230,7 @@ DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD hThrea + } + return VINF_SUCCESS; + } +-#endif // RT_OS_LINUX ++#endif // RT_OS_FREEBSD || RT_OS_LINUX + + + /** +@@ -3590,7 +3590,7 @@ static int vmsvga3dContextDestroyOgl(PVGASTATE pThis, + AssertRC(rc); + #elif defined(RT_OS_DARWIN) + vmsvga3dCocoaDestroyViewAndContext(pContext->cocoaView, pContext->cocoaContext); +-#elif defined(RT_OS_LINUX) ++#elif defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) + glXMakeCurrent(pState->display, None, NULL); + glXDestroyContext(pState->display, pContext->glxContext); + XDestroyWindow(pState->display, pContext->window); +@@ -3648,7 +3648,7 @@ static void vmsvga3dChangeModeOneContext(PVGASTATE pTh + RT_NOREF(pState); + vmsvga3dCocoaViewSetSize(pContext->cocoaView, pThis->svga.uWidth, pThis->svga.uHeight); + +-#elif defined(RT_OS_LINUX) ++#elif defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) + XWindowChanges wc; + wc.width = pThis->svga.uWidth; + wc.height = pThis->svga.uHeight; diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c index cbc332611e9c..96e957fe7440 100644 --- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c @@ -46,9 +46,9 @@ + struct pctrie_iter pages; + vm_page_t page; + -+ pctrie_iter_init(&pages, pMemFreeBSD->pObject); ++ vm_page_iter_init(&pages, pMemFreeBSD->pObject); + VM_RADIX_FORALL(page, &pages) -+ vm_page_unwire(page, PQ_INACTIVE); ++ (void)vm_page_unwire_noq(page); +#endif #if __FreeBSD_version >= 1000030 VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); @@ -248,6 +248,15 @@ if (PhysHighest != NIL_RTHCPHYS) VmPhysAddrHigh = PhysHighest; +@@ -453,7 +487,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB + #else + VM_OBJECT_LOCK(pMemFreeBSD->pObject); + #endif +- pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0)); ++ pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_radix_lookup_ge(&pMemFreeBSD->pObject->rtree, 0)); + #if __FreeBSD_version >= 1000030 + VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); + #else @@ -470,6 +504,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB rtR0MemObjDelete(&pMemFreeBSD->Core); } diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp new file mode 100644 index 000000000000..79dd02e083d7 --- /dev/null +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp @@ -0,0 +1,53 @@ +--- src/VBox/Runtime/r3/xml.cpp.orig 2020-07-09 16:57:46 UTC ++++ src/VBox/Runtime/r3/xml.cpp +@@ -1837,12 +1837,20 @@ static void xmlParserBaseGenericError(void *pCtx, cons + va_end(args); + } + ++#if LIBXML_VERSION >= 21206 ++static void xmlStructuredErrorFunc(void *userData, const xmlError *error) ++{ ++ NOREF(userData); ++ NOREF(error); ++} ++#else + static void xmlParserBaseStructuredError(void *pCtx, xmlErrorPtr error) + { + NOREF(pCtx); + /* we expect that there is always a trailing NL */ + LogRel(("XML error at '%s' line %d: %s", error->file, error->line, error->message)); + } ++#endif + + XmlParserBase::XmlParserBase() + { +@@ -1851,7 +1859,11 @@ XmlParserBase::XmlParserBase() + throw std::bad_alloc(); + /* per-thread so it must be here */ + xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError); ++#if LIBXML_VERSION >= 21206 ++ xmlSetStructuredErrorFunc(NULL, xmlStructuredErrorFunc); ++#else + xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError); ++#endif + } + + XmlParserBase::~XmlParserBase() +@@ -1912,7 +1924,7 @@ void XmlMemParser::read(const void *pvBuf, size_t cbSi + pcszFilename, + NULL, // encoding = auto + options))) +- throw XmlError(xmlCtxtGetLastError(m_ctxt)); ++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt)); + + doc.refreshInternals(); + } +@@ -2172,7 +2184,7 @@ void XmlFileParser::read(const RTCString &strFilename, + pcszFilename, + NULL, // encoding = auto + options))) +- throw XmlError(xmlCtxtGetLastError(m_ctxt)); ++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt)); + + doc.refreshInternals(); + } diff --git a/emulators/virtualbox-ose-legacy/files/vboxinit.in b/emulators/virtualbox-ose-legacy/files/vboxinit.in index 13ec9614827d..9895da9e362e 100644 --- a/emulators/virtualbox-ose-legacy/files/vboxinit.in +++ b/emulators/virtualbox-ose-legacy/files/vboxinit.in @@ -37,7 +37,7 @@ restart_cmd="${name}_restart" vboxinit_start() { # Get a list of all machines with autorun enabled in phpvirtualbox - ${su_command} "${command} list vms | /usr/bin/tr -d '{}\"'" | while read VMNAME UUID; do + ${su_command} "${command} list vms | /usr/bin/tr -d '{}\"'" | /usr/bin/sort | while read VMNAME UUID; do STARTUP=$(${su_command} "${command} getextradata ${UUID} 'pvbx/startupMode'" | /usr/bin/cut -d' ' -f2) if [ "${STARTUP}" == "auto" ]; then echo "${name}: starting machine ${VMNAME} ..." @@ -50,7 +50,7 @@ vboxinit_start() vboxinit_stop() { # Get all running machines - ${su_command} "${command} list runningvms | /usr/bin/tr -d '{}\"'" | while read VMNAME UUID; do + ${su_command} "${command} list runningvms | /usr/bin/tr -d '{}\"'" | /usr/bin/sort -r | while read VMNAME UUID; do echo "${name}: stopping machine ${VMNAME} with action '${vboxinit_stop}' ..." ${su_command} "${command} controlvm ${UUID} ${vboxinit_stop}" sleep "${vboxinit_stop_delay}" @@ -75,7 +75,7 @@ load_rc_config $name : ${vboxinit_user="%%VBOXUSER%%"} : ${vboxinit_home=$(/usr/sbin/pw usershow -7 -n "${vboxinit_user}" | /usr/bin/cut -d: -f6)} : ${vboxinit_stop="savestate"} -: ${vboxinit_start_delay="0"} +: ${vboxinit_start_delay="1"} : ${vboxinit_stop_delay="0"} HOME=${vboxinit_home} USER=${vboxinit_user} |