summaryrefslogtreecommitdiff
path: root/libgo/go/crypto/rand/rand_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/crypto/rand/rand_linux.go')
-rw-r--r--libgo/go/crypto/rand/rand_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/crypto/rand/rand_linux.go b/libgo/go/crypto/rand/rand_linux.go
index 8cb59c75dff..7d6d9e8a094 100644
--- a/libgo/go/crypto/rand/rand_linux.go
+++ b/libgo/go/crypto/rand/rand_linux.go
@@ -5,7 +5,7 @@
package rand
import (
- "internal/syscall"
+ "internal/syscall/unix"
"sync"
)
@@ -25,7 +25,7 @@ func pickStrategy() {
// - the machine has no entropy available (early boot + no hardware
// entropy source?) and we want to avoid blocking later.
var buf [1]byte
- n, err := syscall.GetRandom(buf[:], syscall.GRND_NONBLOCK)
+ n, err := unix.GetRandom(buf[:], unix.GRND_NONBLOCK)
useSyscall = n == 1 && err == nil
}
@@ -34,6 +34,6 @@ func getRandomLinux(p []byte) (ok bool) {
if !useSyscall {
return false
}
- n, err := syscall.GetRandom(p, 0)
+ n, err := unix.GetRandom(p, 0)
return n == len(p) && err == nil
}