aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/Posix
diff options
context:
space:
mode:
Diffstat (limited to 'src/Platform/Posix')
-rw-r--r--src/Platform/Posix/Timespec.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Platform/Posix/Timespec.h b/src/Platform/Posix/Timespec.h
index 4bd673f..ef7f22d 100644
--- a/src/Platform/Posix/Timespec.h
+++ b/src/Platform/Posix/Timespec.h
@@ -2,6 +2,7 @@
#define BH_PLATFORM_POSIX_TIMESPEC_H
+#include <Config.h>
#include <BH/Thread.h>
#include <sys/time.h>
#include <time.h>
@@ -10,7 +11,7 @@
static int convertToTimespec(struct timespec *ts,
uint32_t timeout)
{
-#ifdef USE_CLOCK_GETTIME
+#if (_POSIX_TIMERS > 0) || defined(BH_USE_CLOCK_GETTIME)
if (clock_gettime(CLOCK_REALTIME, ts))
return BH_ERROR;
#else