mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 11:52:22 -07:00
1b15d8b453
Added build tag to rand_bsd.odin and fixed build warning.
17 lines
287 B
Odin
17 lines
287 B
Odin
//+build freebsd, openbsd, netbsd
|
|
package crypto
|
|
|
|
foreign import libc "system:c"
|
|
|
|
foreign libc {
|
|
arc4random_buf :: proc(buf: [^]byte, nbytes: uint) ---
|
|
}
|
|
|
|
_rand_bytes :: proc(dst: []byte) {
|
|
arc4random_buf(raw_data(dst), len(dst))
|
|
}
|
|
|
|
_has_rand_bytes :: proc () -> bool {
|
|
return true
|
|
}
|