summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-04-29 14:14:27 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-04-29 14:19:24 +0200
commit221464c9c4227810de9f027c3ace63805480d723 (patch)
tree9fa7a02f598aceb51988e5bc0c7da3b2bb2f669a /libc
parent3818c3a0b6465dcc4952a13fde83d22716a82ffc (diff)
sysconf: clock_getres depends on HAS_REALTIME
Bug was introduced in revision a202cf6f. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/unistd/sysconf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c
index be58f111f..c1b3c86db 100644
--- a/libc/unistd/sysconf.c
+++ b/libc/unistd/sysconf.c
@@ -993,13 +993,12 @@ long int sysconf(int name)
r = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC, &ts);
return INTERNAL_SYSCALL_ERROR_P (r, err) ? -1 : _POSIX_VERSION;
}
-# else
+# elif defined __UCLIBC_HAS_REALTIME__
if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0)
return _POSIX_VERSION;
-
- RETURN_NEG_1;
# endif
#endif
+ RETURN_NEG_1;
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
case _SC_THREAD_CPUTIME: