VirtualBox

Changeset 75665 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Nov 22, 2018 2:08:09 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126858
Message:

iprt: adjust time-r0drv-linux.c for Linux 4.20.
bugref:4567: Linux kernel driver maintainance.
Routine ktime_get_real_ts() must be replaced by ktime_get_real_ts64().
Thank you Larry Finger for the patch. (Adjusted before applying.)

File:
1 edited

Legend:

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

    r69111 r75665  
    172172    IPRT_LINUX_SAVE_EFL_AC();
    173173#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
     174/* On Linux 4.20, time.h includes time64.h and we have to use 64-bit times. */
     175# ifdef _LINUX_TIME64_H
     176    struct timespec64 Ts;
     177    ktime_get_real_ts64(&Ts);
     178# else
    174179    struct timespec Ts;
    175180    ktime_get_real_ts(&Ts);
     181# endif
    176182    IPRT_LINUX_RESTORE_EFL_AC();
     183# ifdef _LINUX_TIME64_H
     184    return RTTimeSpecSetTimespec64(pTime, &Ts);
     185#else
    177186    return RTTimeSpecSetTimespec(pTime, &Ts);
    178 
     187#endif
    179188#else   /* < 2.6.16 */
    180189    struct timeval Tv;
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