Browse Source

getentropy: guard syscall to getrandom

Waldemar Brodkorb 3 weeks ago
parent
commit
19fe75f0ab
1 changed files with 2 additions and 0 deletions
  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