From 221464c9c4227810de9f027c3ace63805480d723 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 29 Apr 2011 14:14:27 +0200 Subject: sysconf: clock_getres depends on HAS_REALTIME Bug was introduced in revision a202cf6f. Signed-off-by: Bernhard Reutner-Fischer --- libc/unistd/sysconf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libc/unistd') 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: -- cgit v1.2.3