fix some cast warnings
[ardour.git] / libs / pbd / file_manager.cc
index 2cfa63ae39c19aa387b12e79fbbfb550fcad7a61..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;
@@ -233,7 +233,7 @@ FdFileDescriptor::open ()
         * or it treats the file as a text stream and puts in
         * line endings in etc
         */
-#ifdef WIN32
+#ifdef PLATFORM_WINDOWS
 #define WRITE_FLAGS O_RDWR | O_CREAT | O_BINARY
 #define READ_FLAGS O_RDONLY | O_BINARY
 #else