From 9cb263479c4b98f2d28889ca1acc297454e0d875 Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Tue, 2 Jul 2024 07:02:03 -0700 Subject: wasi preview 2 support (#4027) * all: wasip2 support Co-authored-by: Randy Reddig --- src/crypto/rand/rand_arc4random.go | 2 +- src/crypto/rand/rand_urandom.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crypto') diff --git a/src/crypto/rand/rand_arc4random.go b/src/crypto/rand/rand_arc4random.go index 1b1796b4d..64a6218bd 100644 --- a/src/crypto/rand/rand_arc4random.go +++ b/src/crypto/rand/rand_arc4random.go @@ -1,4 +1,4 @@ -//go:build darwin || tinygo.wasm +//go:build darwin || wasip1 || wasip2 || wasm // This implementation of crypto/rand uses the arc4random_buf function // (available on both MacOS and WASI) to generate random numbers. diff --git a/src/crypto/rand/rand_urandom.go b/src/crypto/rand/rand_urandom.go index e9a8d485e..53554529b 100644 --- a/src/crypto/rand/rand_urandom.go +++ b/src/crypto/rand/rand_urandom.go @@ -1,4 +1,4 @@ -//go:build linux && !baremetal && !wasip1 +//go:build linux && !baremetal && !wasip1 && !wasip2 // This implementation of crypto/rand uses the /dev/urandom pseudo-file to // generate random numbers. -- cgit v1.2.3