浏览代码

The case for _SC_MONOTONIC_CLOCK should only exist if 'clock_getres' does.

"Steven J. Hill" 19 年之前
父节点
当前提交
cba65ce147
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      libc/unistd/sysconf.c

+ 2 - 0
libc/unistd/sysconf.c

@@ -884,6 +884,7 @@ long int sysconf(int name)
       RETURN_NEG_1;
 #endif
 
+#ifdef __NR_clock_getres
     case _SC_MONOTONIC_CLOCK:
       /* Check using the clock_getres system call.  */
       if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0)
@@ -891,5 +892,6 @@ long int sysconf(int name)
 
       RETURN_NEG_1;
     }
+#endif
 }
 libc_hidden_def(sysconf)