diff options
Diffstat (limited to 'lib/replace/system')
-rw-r--r-- | lib/replace/system/time.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/replace/system/time.h b/lib/replace/system/time.h index ff26531e45..3605d2692e 100644 --- a/lib/replace/system/time.h +++ b/lib/replace/system/time.h @@ -67,9 +67,16 @@ int rep_utimes(const char *filename, const struct timeval tv[2]); #endif #ifndef HAVE_CLOCK_GETTIME +/* CLOCK_REALTIME is required by POSIX */ #define CLOCK_REALTIME 0 typedef int clockid_t; int rep_clock_gettime(clockid_t clk_id, struct timespec *tp); #endif +/* make sure we have a best effort CUSTOM_CLOCK_MONOTONIC we can rely on */ +#ifndef CLOCK_MONOTONIC +#define CUSTOM_CLOCK_MONOTONIC CLOCK_REALTIME +#else +#define CUSTOM_CLOCK_MONOTONIC CLOCK_MONOTONIC +#endif #endif |