On Thursday 11 August 2011 02:08 pm, Michael Butler wrote:
> /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.0.12_OSE
>/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-
>freebsd.c: In function 'rtR0MemObjFreeBSDPhysPageInit':
>
> /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.0.12_OSE
>/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-
>freebsd.c:396: error: 'PG_UNMANAGED' undeclared (first use in this
> function)
>
> Should "pPage->flags = PG_UNMANAGED" now be replaced by some page
> lock/unlock function which applies "pPage->oflags = VPO_UNMANAGED"?

I am not sure if it is really correct but this patch worked for me:

--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig
+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
@@ -392,8 +392,13 @@
     pPage->wire_count = 1;
     pPage->pindex     = iPage;
     pPage->act_count  = 0;
+#if __FreeBSD_version < 900000
     pPage->oflags     = 0;
     pPage->flags      = PG_UNMANAGED;
+#else
+    pPage->oflags     = VPO_UNMANAGED;
+    pPage->flags      = 0;
+#endif
     atomic_add_int(&cnt.v_wire_count, 1);
 }
 
Jung-uk Kim
_______________________________________________
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"

Reply via email to