diff options
author | Stefan Hajnoczi | 2015-07-08 16:10:09 +0200 |
---|---|---|
committer | Peter Maydell | 2015-07-20 18:01:00 +0200 |
commit | 13566fe3e584e7b14a6f45246976b91677dc2a77 (patch) | |
tree | 5d62375ef4c36a58db30feef2a65c7bcadfa44f7 /hw/ppc/ppc.c | |
parent | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (diff) | |
download | qemu-13566fe3e584e7b14a6f45246976b91677dc2a77.tar.gz qemu-13566fe3e584e7b14a6f45246976b91677dc2a77.tar.xz qemu-13566fe3e584e7b14a6f45246976b91677dc2a77.zip |
timer: rename NSEC_PER_SEC due to Mac OS X header clash
Commit e0cf11f31c24cfb17f44ed46c254d84c78e7f6e9 ("timer: Use a single
definition of NSEC_PER_SEC for the whole codebase") renamed
NANOSECONDS_PER_SECOND to NSEC_PER_SEC.
On Mac OS X there is a <dispatch/time.h> system header which also
defines NSEC_PER_SEC. This causes compiler warnings.
Let's use the old name instead. It's longer but it doesn't clash.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1436364609-7929-1-git-send-email-stefanha@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ppc/ppc.c')
-rw-r--r-- | hw/ppc/ppc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 2a4b8e18b3..b77e30357a 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -873,8 +873,9 @@ static int timebase_post_load(void *opaque, int version_id) */ host_ns = qemu_clock_get_ns(QEMU_CLOCK_HOST); ns_diff = MAX(0, host_ns - tb_remote->time_of_the_day_ns); - migration_duration_ns = MIN(NSEC_PER_SEC, ns_diff); - migration_duration_tb = muldiv64(migration_duration_ns, freq, NSEC_PER_SEC); + migration_duration_ns = MIN(NANOSECONDS_PER_SECOND, ns_diff); + migration_duration_tb = muldiv64(migration_duration_ns, freq, + NANOSECONDS_PER_SECOND); guest_tb = tb_remote->guest_timebase + MIN(0, migration_duration_tb); tb_off_adj = guest_tb - cpu_get_real_ticks(); |