summaryrefslogtreecommitdiff
path: root/drivers/dummy
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@macports.org>2016-07-03 22:57:16 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-07-03 23:00:56 -0700
commit96c3ac0ae69f2a3dea6fea6fdc3a217853108cdb (patch)
tree49e0a8ecc408882b66f85c728c64980d4e6cf1fd /drivers/dummy
parent8a7253575c58134bb33b2b24f10eec7ce7bd051d (diff)
downloadjack1-96c3ac0ae69f2a3dea6fea6fdc3a217853108cdb.tar.gz
Check for clock_nanosleep before use
Fixes a build failure on macOS 10.12 Sierra
Diffstat (limited to 'drivers/dummy')
-rw-r--r--drivers/dummy/dummy_driver.c2
-rw-r--r--drivers/dummy/dummy_driver.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dummy/dummy_driver.c b/drivers/dummy/dummy_driver.c
index d414cb1..b8e1b9c 100644
--- a/drivers/dummy/dummy_driver.c
+++ b/drivers/dummy/dummy_driver.c
@@ -73,7 +73,7 @@ FakeVideoSync ( dummy_driver_t *driver )
}
}
-#ifdef HAVE_CLOCK_GETTIME
+#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_NANOSLEEP)
static inline unsigned long long ts_to_nsec (struct timespec ts)
{
return ts.tv_sec * 1000000000LL + ts.tv_nsec;
diff --git a/drivers/dummy/dummy_driver.h b/drivers/dummy/dummy_driver.h
index 296f027..4daf182 100644
--- a/drivers/dummy/dummy_driver.h
+++ b/drivers/dummy/dummy_driver.h
@@ -43,7 +43,7 @@ struct _dummy_driver {
jack_nframes_t period_size;
unsigned long wait_time;
-#ifdef HAVE_CLOCK_GETTIME
+#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_NANOSLEEP)
struct timespec next_wakeup;
#else
jack_time_t next_time;