summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-10-02 02:53:35 +0200
committerRobin Gareus <robin@gareus.org>2014-10-02 02:53:35 +0200
commit8fe3360c3550f96b2b73ef8b36b5a77a760f8f8c (patch)
treed325bc8835fcb970abb03d4f449b020d3ed88cd6 /libs/pbd
parent0d20cd5911008cb1482d5602e4a408876999347c (diff)
fix clock_gettime detection
fixes compilation with mingw64 gcc-4.9.1
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/file_manager.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/pbd/file_manager.cc b/libs/pbd/file_manager.cc
index 4bc6974f4d..702c1e1b8f 100644
--- a/libs/pbd/file_manager.cc
+++ b/libs/pbd/file_manager.cc
@@ -118,7 +118,7 @@ FileManager::allocate (FileDescriptor* d)
#ifdef __APPLE__
d->_last_used = mach_absolute_time();
-#elif defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
+#elif defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_C_SOURCE >= 199309L)
struct timespec t;
clock_gettime (CLOCK_MONOTONIC, &t);
d->_last_used = t.tv_sec + (double) t.tv_nsec / 10e9;