X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/a991bd8d3e7fe02dbca0644054bab73c5b75324a..refs/heads/master:/libsyscall/wrappers/mach_approximate_time.c diff --git a/libsyscall/wrappers/mach_approximate_time.c b/libsyscall/wrappers/mach_approximate_time.c index cb199cf07..50fc667b9 100644 --- a/libsyscall/wrappers/mach_approximate_time.c +++ b/libsyscall/wrappers/mach_approximate_time.c @@ -30,9 +30,8 @@ extern uint64_t mach_absolute_time(void); uint64_t mach_approximate_time(void) { - uint8_t supported = *((uint8_t *)_COMM_PAGE_APPROX_TIME_SUPPORTED); - if (supported) { - return *((uint64_t *)_COMM_PAGE_APPROX_TIME); + if (COMM_PAGE_READ(uint8_t, APPROX_TIME_SUPPORTED)) { + return COMM_PAGE_READ(uint64_t, APPROX_TIME); } return mach_absolute_time(); }