VirtualBox

Ignore:
Timestamp:
Feb 1, 2019 5:29:01 PM (6 years ago)
Author:
vboxsync
Message:

the-freebsd-kernel.h,memobj-r0drv-freebsd.cpp: Build fix for newer FreeBSD versions

Location:
trunk/src/VBox/Runtime/r0drv/freebsd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c

    r77129 r77131  
    236236        if (pPages)
    237237            break;
     238#if __FreeBSD_version >= 1100092
     239        if (!vm_page_reclaim_contig(cTries, cPages, 0, VmPhysAddrHigh, PAGE_SIZE, 0))
     240            break;
     241#else
    238242        vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh);
     243#endif
    239244        cTries++;
    240245    }
     
    737742        /** @todo is this needed?. */
    738743        PROC_LOCK(pProc);
    739         AddrR3 = round_page((vm_offset_t)pProc->p_vmspace->vm_daddr + lim_max(pProc, RLIMIT_DATA));
     744        AddrR3 = round_page((vm_offset_t)pProc->p_vmspace->vm_daddr + MY_LIM_MAX_PROC(pProc, RLIMIT_DATA));
    740745        PROC_UNLOCK(pProc);
    741746    }
  • trunk/src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h

    r77129 r77131  
    137137#endif
    138138
     139#if __FreeBSD_version >= 1100077
     140# define MY_LIM_MAX_PROC(a_pProc, a_Limit) lim_max_proc((a_pProc), (a_Limit))
     141#else
     142# define MY_LIM_MAX_PROC(a_pProc, a_Limit) lim_max((a_pProc), (a_Limit))
     143#endif
     144
    139145/**
    140146 * Check whether we can use kmem_alloc_attr for low allocs.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette