summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2025-04-11 15:52:34 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2025-04-11 15:52:34 +0200
commit19fe75f0ab09c9661ff03738579171624fc35018 (patch)
treec56598b2a01d3c687895355f2ced4d1346bcad79
parent8a6bb3fb10bef1a31088e845f6b4b2ae44959ef3 (diff)
getentropy: guard syscall to getrandom
-rw-r--r--libc/sysdeps/linux/common/getentropy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/getentropy.c b/libc/sysdeps/linux/common/getentropy.c
index 971674c4f..55bd48a12 100644
--- a/libc/sysdeps/linux/common/getentropy.c
+++ b/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