Browse Source

sysconf: clock_getres depends on HAS_REALTIME

Bug was introduced in revision a202cf6f.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 13 years ago
parent
commit
221464c9c4
1 changed files with 2 additions and 3 deletions
  1. 2 3
      libc/unistd/sysconf.c

+ 2 - 3
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: