Pārlūkot izejas kodu

Added support for sysconf(_SC_MONOTONIC_CLOCK).

Peter Kjellerstedt 19 gadi atpakaļ
vecāks
revīzija
45223588d1
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      libc/unistd/sysconf.c

+ 7 - 0
libc/unistd/sysconf.c

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