mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-26 15:34:59 -07:00
Merge branch 'master' into new-sys-unix
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package rand
|
||||
|
||||
foreign import "odin_env"
|
||||
foreign odin_env {
|
||||
@(link_name = "rand_bytes")
|
||||
env_rand_bytes :: proc "contextless" (buf: []byte) ---
|
||||
}
|
||||
|
||||
@(require_results)
|
||||
_system_random :: proc() -> u64 {
|
||||
buf: [8]u8
|
||||
env_rand_bytes(buf[:])
|
||||
return transmute(u64)buf
|
||||
}
|
||||
Reference in New Issue
Block a user