浏览代码

getentropy: guard syscall to getrandom

Waldemar Brodkorb 1 月之前
父节点
当前提交
19fe75f0ab
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      libc/sysdeps/linux/common/getentropy.c

+ 2 - 0
libc/sysdeps/linux/common/getentropy.c

@@ -13,6 +13,7 @@
 #include <unistd.h>
 #include <unistd.h>
 #include <sys/random.h>
 #include <sys/random.h>
 
 
+#ifdef __NR_getrandom
 int
 int
 getentropy(void *__buf, size_t __len)
 getentropy(void *__buf, size_t __len)
 {
 {
@@ -41,3 +42,4 @@ getentropy(void *__buf, size_t __len)
 		goto again;
 		goto again;
 	return (0);
 	return (0);
 }
 }
+#endif