Skip to content

Commit

Permalink
wasi: do not reference syscall package in pathFilestatSetTimesFn
Browse files Browse the repository at this point in the history
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
  • Loading branch information
evacchi committed Aug 23, 2023
1 parent 0113db7 commit 141a0f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions imports/wasi_snapshot_preview1/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"math"
"path"
"strings"
"syscall"
"unsafe"

"github.com/tetratelabs/wazero/api"
Expand Down Expand Up @@ -1463,7 +1462,7 @@ func pathFilestatSetTimesFn(_ context.Context, mod api.Module, params []uint64)
return preopen.Utimens(pathName, atim, mtim)
}
// Otherwise, we need to emulate don't follow by opening the file by path.
if f, errno := preopen.OpenFile(pathName, syscall.O_WRONLY, 0); errno != 0 {
if f, errno := preopen.OpenFile(pathName, experimentalsys.O_WRONLY, 0); errno != 0 {
return errno
} else {
defer f.Close()
Expand Down

0 comments on commit 141a0f3

Please sign in to comment.