aboutsummaryrefslogtreecommitdiff
path: root/tests/wdt_ib700-test.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2015-07-08 15:10:09 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-07-20 17:01:00 +0100
commit13566fe3e584e7b14a6f45246976b91677dc2a77 (patch)
tree5d62375ef4c36a58db30feef2a65c7bcadfa44f7 /tests/wdt_ib700-test.c
parentdcc8a3ab632d0f11a1bf3b08381cf0f93e616b9f (diff)
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 'tests/wdt_ib700-test.c')
-rw-r--r--tests/wdt_ib700-test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/wdt_ib700-test.c b/tests/wdt_ib700-test.c
index 10a54720ff..82ca597252 100644
--- a/tests/wdt_ib700-test.c
+++ b/tests/wdt_ib700-test.c
@@ -40,29 +40,29 @@ static QDict *qmp_get_event(const char *name)
static QDict *ib700_program_and_wait(QTestState *s)
{
- clock_step(NSEC_PER_SEC * 40);
+ clock_step(NANOSECONDS_PER_SECOND * 40);
qmp_check_no_event();
/* 2 second limit */
outb(0x443, 14);
/* Ping */
- clock_step(NSEC_PER_SEC);
+ clock_step(NANOSECONDS_PER_SECOND);
qmp_check_no_event();
outb(0x443, 14);
/* Disable */
- clock_step(NSEC_PER_SEC);
+ clock_step(NANOSECONDS_PER_SECOND);
qmp_check_no_event();
outb(0x441, 1);
- clock_step(3 * NSEC_PER_SEC);
+ clock_step(3 * NANOSECONDS_PER_SECOND);
qmp_check_no_event();
/* Enable and let it fire */
outb(0x443, 13);
- clock_step(3 * NSEC_PER_SEC);
+ clock_step(3 * NANOSECONDS_PER_SECOND);
qmp_check_no_event();
- clock_step(2 * NSEC_PER_SEC);
+ clock_step(2 * NANOSECONDS_PER_SECOND);
return qmp_get_event("WATCHDOG");
}