Explorar el Código

getentropy: guard syscall to getrandom

Waldemar Brodkorb hace 9 meses
padre
commit
19fe75f0ab
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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