[git commit prelink] sysconf: clock_getres depends on HAS_REALTIME

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed May 4 04:56:14 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=221464c9c4227810de9f027c3ace63805480d723
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/prelink

Bug was introduced in revision a202cf6f.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/unistd/sysconf.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c
index be58f11..c1b3c86 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:
-- 
1.7.3.4



More information about the uClibc-cvs mailing list