]> sjero.net Git - wget/blobdiff - src/ptimer.c
[svn] Check that _POSIX_CLOCK_MONOTONIC >= 0 before using it.
[wget] / src / ptimer.c
index 45a389a847e67db993c0880ef8039596e6093662..47980cfcd2edc1bf0a34763d28c9686200c4d2cc 100644 (file)
@@ -183,7 +183,7 @@ ptimer_init (void)
 {
   struct timespec res;
 
-#ifdef _POSIX_MONOTONIC_CLOCK
+#if _POSIX_MONOTONIC_CLOCK >= 0                   /* -1 means not supported */
   if (sysconf (_SC_MONOTONIC_CLOCK) > 0)
     posix_clock_id = CLOCK_MONOTONIC;
   else