瀏覽代碼

getentropy: guard syscall to getrandom

Waldemar Brodkorb 10 月之前
父節點
當前提交
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 <sys/random.h>
 
+#ifdef __NR_getrandom
 int
 getentropy(void *__buf, size_t __len)
 {
@@ -41,3 +42,4 @@ getentropy(void *__buf, size_t __len)
 		goto again;
 	return (0);
 }
+#endif