git: 4ed1b7b5a796 - main - emulators/open-vm-kmod: fix build on CURRENT after 2d0634d2e74b

From: Brad Davis <brd_at_FreeBSD.org>
Date: Tue, 05 May 2026 14:11:29 UTC
The branch main has been updated by brd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4ed1b7b5a7966b75bc4bc782a68ce33b0d530d15

commit 4ed1b7b5a7966b75bc4bc782a68ce33b0d530d15
Author:     Brad Davis <brd@FreeBSD.org>
AuthorDate: 2026-05-05 14:05:51 +0000
Commit:     Brad Davis <brd@FreeBSD.org>
CommitDate: 2026-05-05 14:05:51 +0000

    emulators/open-vm-kmod: fix build on CURRENT after 2d0634d2e74b
    
    Approved by:    garga
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 emulators/open-vm-kmod/files/patch-vmmemctl_os.c | 32 ++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/emulators/open-vm-kmod/files/patch-vmmemctl_os.c b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
index 899fd4d90a50..0963148595fe 100644
--- a/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
+++ b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c
@@ -1,4 +1,4 @@
---- vmmemctl/os.c.orig	2025-09-30 06:45:41 UTC
+--- vmmemctl/os.c.orig	2026-01-22 06:30:37 UTC
 +++ vmmemctl/os.c
 @@ -91,8 +91,13 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta
  /*
@@ -27,7 +27,35 @@
  
  /*
   * Globals
-@@ -404,7 +413,7 @@ os_pmap_free(os_pmap *p) // IN
+@@ -322,7 +331,11 @@ OS_MapPageHandle(PageHandle handle)     // IN
+ Mapping
+ OS_MapPageHandle(PageHandle handle)     // IN
+ {
++#if __FreeBSD_version > 1600015
++   void * res = KVA_ALLOC(PAGE_SIZE);
++#else
+    vm_offset_t res = KVA_ALLOC(PAGE_SIZE);
++#endif
+ 
+    vm_page_t page = (vm_page_t)handle;
+ 
+@@ -379,8 +392,13 @@ OS_UnmapPage(Mapping mapping)           // IN
+ void
+ OS_UnmapPage(Mapping mapping)           // IN
+ {
+-   pmap_qremove((vm_offset_t)mapping, 1);
+-   KVA_FREE((vm_offset_t)mapping, PAGE_SIZE);
++#if __FreeBSD_version > 1600015
++   pmap_qremove((void *)mapping, 1);
++   KVA_FREE((void *)mapping, PAGE_SIZE);
++#else
++   pmap_qremove(mapping, 1);
++   KVA_FREE(mapping, PAGE_SIZE);
++#endif
+ }
+ 
+ 
+@@ -404,7 +422,7 @@ os_pmap_free(os_pmap *p) // IN
  static void
  os_pmap_free(os_pmap *p) // IN
  {