diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2021-09-20 17:33:31 +0300 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2021-09-20 16:14:05 +0000 |
commit | 55c455b1a8774213bf3af7f00250121bcac8d5c1 (patch) | |
tree | 6fdb033f0211b6c4c619a5bb9ce5479c25b9d71f | |
parent | 0ad9f1ccb57d5dd8c6c9badbd032b510d27a6650 (diff) | |
download | qbs-55c455b1a8774213bf3af7f00250121bcac8d5c1.tar.gz |
freebsd: fix filetime precision
FreeBSD support ms precision, but the used macro cannot
detect that. Check OS version instead.
Change-Id: Ia9bb872941bcd994b5aa290487468a332aa2d378
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/lib/corelib/tools/filetime.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/corelib/tools/filetime.h b/src/lib/corelib/tools/filetime.h index f9a15f794..70f4f4461 100644 --- a/src/lib/corelib/tools/filetime.h +++ b/src/lib/corelib/tools/filetime.h @@ -47,7 +47,12 @@ #if defined(Q_OS_UNIX) && !defined(__APPLE__) #include <time.h> -#define HAS_CLOCK_GETTIME (_POSIX_C_SOURCE >= 199309L) +# if defined(Q_OS_FREEBSD) +// FreeBSD 9.0 and above supports m_tim +# define HAS_CLOCK_GETTIME (__FreeBSD_version >= 900000) +# else +# define HAS_CLOCK_GETTIME (_POSIX_C_SOURCE >= 199309L) +# endif #endif // Q_OS_UNIX #ifdef __APPLE__ |