Преглед на файлове

Recognize _SC_MONOTONIC_CLOCK in sysconf() even if __NR_clock_getres
is not defined.

Peter Kjellerstedt преди 17 години
родител
ревизия
502f1bc19f
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      libc/unistd/sysconf.c

+ 2 - 2
libc/unistd/sysconf.c

@@ -884,14 +884,14 @@ long int sysconf(int name)
       RETURN_NEG_1;
 #endif
 
-#ifdef __NR_clock_getres
     case _SC_MONOTONIC_CLOCK:
+#ifdef __NR_clock_getres
       /* Check using the clock_getres system call.  */
       if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0)
         return _POSIX_VERSION;
+#endif
 
       RETURN_NEG_1;
-#endif
     }
 }
 libc_hidden_def(sysconf)