Skip to content

Commit

Permalink
Merge pull request #58 from ChinYikMing/fix-build-macOS
Browse files Browse the repository at this point in the history
Fix build on macOS
  • Loading branch information
jserv authored Sep 9, 2024
2 parents 3713eaf + 96ab5d4 commit 67f5c71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static uint64_t semu_timer_clocksource(uint64_t freq)
return t.tv_sec * freq + mult_frac(t.tv_nsec, freq, 1e9);
#elif defined(HAVE_MACH_TIMER)
static mach_timebase_info_data_t t;
if (mach_clk.denom == 0)
if (t.denom == 0)
(void) mach_timebase_info(&t);
return mult_frac(mach_absolute_time() * freq, t.numer, t.denom);
#else
Expand All @@ -62,4 +62,4 @@ uint64_t semu_timer_get(semu_timer_t *timer)
void semu_timer_rebase(semu_timer_t *timer, uint64_t time)
{
timer->begin = semu_timer_clocksource(timer->freq) - time;
}
}

0 comments on commit 67f5c71

Please sign in to comment.