- Timestamp:
- Mar 30, 2020 2:37:26 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/time.h
r83473 r83484 407 407 408 408 /* PORTME: Add struct timespec guard macro here. */ 409 #if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \ 410 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_)) 409 /* 410 * Starting with Linux kernel version 5.6-rc3, the _STRUCT_TIMESPEC is only defined 411 * under !__KERNEL__ guard and _LINUX_TIME64_H does not define a corresponding 412 * _STRUCT_TIMESPEC64. Only 64-bit time-interfaces are now allowed into the kernel. 413 * We have to keep it for __KERNEL__ though to support older guest kernels (2.6.X) 414 * without _LINUX_TIME64_H. 415 */ 416 #if defined(RT_OS_LINUX) && defined(_LINUX_TIME64_H) 417 #define RTTIME_NO_TIMESPEC 418 #endif 419 #if !defined(RTTIME_NO_TIMESPEC) \ 420 && (defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) \ 421 || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \ 422 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))) 411 423 /** 412 424 * Gets the time as POSIX timespec. … … 444 456 #endif /* various ways of detecting struct timespec */ 445 457 446 #if defined(RT_OS_LINUX) && defined(_LINUX_TIME64_H) 447 /* 448 * Starting with Linux kernel version 5.6-rc3, the _STRUCT_TIMESPEC is only defined 449 * under !__KERNEL__ guard and _LINUX_TIME64_H does not define a corresponding 450 * _STRUCT_TIMESPEC64. Only 64-bit time-interfaces are now allowed into the kernel. 451 */ 458 #if defined(RTTIME_NO_TIMESPEC) 452 459 DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval) 453 460 { -
trunk/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
r83471 r83484 195 195 # ifdef _LINUX_TIME64_H 196 196 return RTTimeSpecSetTimespec64(pTime, &Ts); 197 # else197 # else 198 198 return RTTimeSpecSetTimespec(pTime, &Ts); 199 # endif199 # endif 200 200 #else /* < 2.6.16 */ 201 201 struct timeval Tv;
Note:
See TracChangeset
for help on using the changeset viewer.