summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2006-09-22 16:54:49 +0000
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>2006-09-22 16:54:49 +0000
commit45223588d17a4774e5c34fdd4d9a0c60f49242ee (patch)
tree88a6eaedfda5c1ba6c6ad6bd27dcbf19d2f6cb54
parent980592d971c46db7ab046eacece95f6496b73e4b (diff)
Added support for sysconf(_SC_MONOTONIC_CLOCK).
-rw-r--r--libc/unistd/sysconf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c
index 0dde75102..f595b4173 100644
--- a/libc/unistd/sysconf.c
+++ b/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)