VirtualBox

Ignore:
Timestamp:
Aug 11, 2020 5:05:29 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139838
Message:

IPRT,lnx-kmods: Use new linux kernel version checking macros. Moved them to separate wrapper header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/memuserkernel-r0drv-linux.c

    r82968 r85698  
    6767{
    6868    IPRT_LINUX_SAVE_EFL_AC();
    69 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) || defined(RHEL_81)
     69#if RTLNX_VER_MIN(5,0,0) || defined(RHEL_81)
    7070    bool fRc = access_ok((void *)R3Ptr, 1);
    7171#else
     
    8787#else
    8888# error "PORT ME"
    89 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) || defined(RHEL_81)
     89#if RTLNX_VER_MIN(5,0,0) || defined(RHEL_81)
    9090    return !access_ok(pv, 1);
    9191#else
    9292    return !access_ok(VERIFY_READ, pv, 1);
    93 #endif /* LINUX_VERSION_CODE */
     93#endif
    9494#endif
    9595}
     
    113113static int rtR0MemKernelCopyLnxWorker(void *pvDst, void const *pvSrc, size_t cb)
    114114{
    115 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 55)
     115#if RTLNX_VER_MIN(2,5,55)
    116116/* _ASM_EXTABLE was introduced in 2.6.25 from what I can tell. Using #ifndef
    117117   here since it has to be a macro and you never know what someone might have
Note: See TracChangeset for help on using the changeset viewer.

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