fix clock_gettime detection
authorRobin Gareus <robin@gareus.org>
Thu, 2 Oct 2014 00:53:35 +0000 (02:53 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 2 Oct 2014 00:53:35 +0000 (02:53 +0200)
fixes compilation with mingw64 gcc-4.9.1

libs/pbd/file_manager.cc

index 4bc6974f4d20974a719863958e43d09ba7271476..702c1e1b8fe8ac6e453d0371bc7a660f7bb13f6b 100644 (file)
@@ -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;