From 8aea808b1da9f5ab72b515a7388ee2bc542ea4fc Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 7 Sep 2015 10:50:48 -0400 Subject: [PATCH] libCom: cross mingw imports posix time.h by default at least mingw 4.9.1 for Debian 8 i386 host. --- src/ioc/db/test/dbStressLock.c | 4 ++-- src/libCom/osi/osiClockTime.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ioc/db/test/dbStressLock.c b/src/ioc/db/test/dbStressLock.c index 354268674..3f3a0a898 100644 --- a/src/ioc/db/test/dbStressLock.c +++ b/src/ioc/db/test/dbStressLock.c @@ -40,7 +40,7 @@ #include "xRecord.h" -#if defined(CLOCK_MONOTONIC) +#if defined(CLOCK_MONOTONIC) && !defined(_WIN32) # define TIME_STATS #endif @@ -175,8 +175,8 @@ void worker(void *raw) double sel = getRand(); #ifdef TIME_STATS struct timespec after; -#endif double duration; +#endif int act; if(sel<0.33) { diff --git a/src/libCom/osi/osiClockTime.c b/src/libCom/osi/osiClockTime.c index ec4e8a5aa..d565033a0 100644 --- a/src/libCom/osi/osiClockTime.c +++ b/src/libCom/osi/osiClockTime.c @@ -39,7 +39,7 @@ static struct { static epicsThreadOnceId onceId = EPICS_THREAD_ONCE_INIT; -#ifdef CLOCK_REALTIME +#if defined(CLOCK_REALTIME) && !defined(_WIN32) /* This code is not used on systems without Posix CLOCK_REALTIME such * as Darwin, but the only way to detect that is from the OS headers, * so the Makefile can't exclude building this file on those systems.