Hi, I committed the patch below as obvious to the 4.7 (r210042) and 4.8 (r210041) branches.
2014-05-03 Janne Blomqvist <j...@gcc.gnu.org> Backport from 4.9 PR libfortran/56919 * intrinsics/system_clock.c (GF_CLOCK_MONOTONIC): Check _POSIX_MONOTONIC_CLOCK as well. Index: intrinsics/system_clock.c =================================================================== --- intrinsics/system_clock.c (revision 210040) +++ intrinsics/system_clock.c (working copy) @@ -32,7 +32,8 @@ see the files COPYING3 and COPYING.RUNTI /* POSIX states that CLOCK_REALTIME must be present if clock_gettime is available, others are optional. */ #if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_CLOCK_GETTIME_LIBRT) -#ifdef CLOCK_MONOTONIC +#if defined(CLOCK_MONOTONIC) && defined(_POSIX_MONOTONIC_CLOCK) \ + && _POSIX_MONOTONIC_CLOCK >= 0 #define GF_CLOCK_MONOTONIC CLOCK_MONOTONIC #else #define GF_CLOCK_MONOTONIC CLOCK_REALTIME -- Janne Blomqvist