Browse Source

getentropy: guard syscall to getrandom

Waldemar Brodkorb 6 tháng trước cách đây
mục cha
commit
19fe75f0ab
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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