git: 7270b8992214 - main - emulators/virtualbox-ose: Fix build with LLVM 15

From: Jung-uk Kim <jkim_at_FreeBSD.org>
Date: Mon, 06 Mar 2023 20:56:46 UTC
The branch main has been updated by jkim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7270b8992214047dcc21af347cbab98900122450

commit 7270b8992214047dcc21af347cbab98900122450
Author:     Jung-uk Kim <jkim@FreeBSD.org>
AuthorDate: 2023-03-06 20:55:11 +0000
Commit:     Jung-uk Kim <jkim@FreeBSD.org>
CommitDate: 2023-03-06 20:55:11 +0000

    emulators/virtualbox-ose: Fix build with LLVM 15
    
    The previous commit (f4a869a6424a) was in complete.
---
 .../files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c
index b7e262dd4ba2..ea9d35bc1c65 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c
@@ -127,7 +127,7 @@
          }
 -        rc = copyin(pvUser, pHdr, Hdr.cbIn);
 -        if (RT_UNLIKELY(rc))
-+        if (RT_FAILURE(RTR0MemUserCopyFrom(pHdr, pvUser, Hdr.cbIn)))
++        if (RT_FAILURE(RTR0MemUserCopyFrom(pHdr, (uintptr_t)pvUser, Hdr.cbIn)))
          {
 -            OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyin(%p,%p,%#x) -> %#x; ulCmd=%#lx\n",
 -                        pvUser, pHdr, Hdr.cbIn, rc, ulCmd));
@@ -146,7 +146,7 @@
 -            rc = copyout(pHdr, pvUser, cbOut);
 -            if (RT_UNLIKELY(rc))
 -                OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyout(%p,%p,%#x) -> %d; uCmd=%#lx!\n", pHdr, pvUser, cbOut, rc, ulCmd));
-+            if (RT_FAILURE(RTR0MemUserCopyTo(pvUser, pHdr, cbOut)))
++            if (RT_FAILURE(RTR0MemUserCopyTo((uintptr_t)pvUser, pHdr, cbOut)))
 +                OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyout(%p,%p,%#x); uCmd=%#lx!\n", pHdr, pvUser, cbOut, ulCmd));
  
              Log(("VBoxDrvFreeBSDIOCtlSlow: returns %d / %d ulCmd=%lx\n", 0, pHdr->rc, ulCmd));