runtime: add runtime.rand function

This function is needed for Go 1.22, and is used from various packages
like math/rand.

When there is no random number generator available, it falls back to a
static sequence of numbers. I think this is fine, because as far as I
can see it is only used for non-cryptographic needs.
This commit is contained in:
Ayke van Laethem
2024-01-18 21:27:08 +01:00
parent 204659bdcd
commit e9003e2deb
11 changed files with 102 additions and 1 deletions
+1
View File
@@ -119,6 +119,7 @@ var Musl = Library{
"internal/syscall_ret.c",
"internal/vdso.c",
"legacy/*.c",
"linux/*.c",
"malloc/*.c",
"malloc/mallocng/*.c",
"mman/*.c",