mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
rand: fix compilation on linux
This commit is contained in:
parent
ca81442fac
commit
cd07429cc1
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ pub fn read(bytes_needed int) ?[]byte {
|
|||
// getrandom syscall wont block if requesting <= 256 bytes
|
||||
if bytes_needed > read_batch_size {
|
||||
no_batches := int(math.floor(f64(bytes_needed/read_batch_size)))
|
||||
for i:=0; i<no_batches; i++ {
|
||||
for i:=0; i < no_batches; i++ {
|
||||
if getrandom(read_batch_size, buffer+bytes_read) == -1 {
|
||||
return read_error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue