瀏覽代碼

- fix build error
brk.c:(.text.__GI_sysconf+0xd4): undefined reference to `clock_getres'

Bernhard Reutner-Fischer 17 年之前
父節點
當前提交
8b59245621
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libc/unistd/sysconf.c

+ 1 - 1
libc/unistd/sysconf.c

@@ -884,7 +884,7 @@ long int sysconf(int name)
 #endif
 #endif
 
 
     case _SC_MONOTONIC_CLOCK:
     case _SC_MONOTONIC_CLOCK:
-#ifdef __NR_clock_getres
+#if defined __UCLIBC_HAS_REALTIME__ && defined __NR_clock_getres
       /* Check using the clock_getres system call.  */
       /* Check using the clock_getres system call.  */
       if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0)
       if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0)
         return _POSIX_VERSION;
         return _POSIX_VERSION;