diff --git a/src/common/mythread.h b/src/common/mythread.h index 9be90d4e..a0dced19 100644 --- a/src/common/mythread.h +++ b/src/common/mythread.h @@ -100,12 +100,18 @@ mythread_sigmask(int how, const sigset_t *restrict set, // Using pthreads // //////////////////// -#include #include #include #include #include +// If clock_gettime() isn't available, use gettimeofday() from +// as a fallback. gettimeofday() is in SUSv2 and thus is supported on all +// relevant POSIX systems. +#if !defined(HAVE_CLOCK_GETTIME) +# include +#endif + #define MYTHREAD_RET_TYPE void * #define MYTHREAD_RET_VALUE NULL