summaryrefslogtreecommitdiff
path: root/vendor/github.com/tetratelabs/wazero/internal/sysfs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/internal/sysfs')
-rw-r--r--vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go4
-rw-r--r--vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_linux.go2
-rw-r--r--vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_unsupported.go2
3 files changed, 5 insertions, 3 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go b/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go
index 717f8598a..478851729 100644
--- a/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go
+++ b/vendor/github.com/tetratelabs/wazero/internal/sysfs/open_file_windows.go
@@ -36,7 +36,9 @@ func openFile(path string, oflag sys.Oflag, perm fs.FileMode) (*os.File, sys.Err
// To match expectations of WASI, e.g. TinyGo TestStatBadDir, return
// ENOENT, not ENOTDIR.
case sys.ENOTDIR:
- errno = sys.ENOENT
+ if !strings.HasSuffix(path, "/") {
+ errno = sys.ENOENT
+ }
case sys.ENOENT:
if isSymlink(path) {
// Either symlink or hard link not found. We change the returned
diff --git a/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_linux.go b/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_linux.go
index fd289756d..4ca5c3b86 100644
--- a/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_linux.go
+++ b/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_linux.go
@@ -1,4 +1,4 @@
-//go:build (amd64 || arm64 || riscv64) && linux
+//go:build (amd64 || arm64 || ppc64le || riscv64 || s390x) && linux
// Note: This expression is not the same as compiler support, even if it looks
// similar. Platform functions here are used in interpreter mode as well.
diff --git a/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_unsupported.go b/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_unsupported.go
index 4b05a8977..b966c4333 100644
--- a/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_unsupported.go
+++ b/vendor/github.com/tetratelabs/wazero/internal/sysfs/stat_unsupported.go
@@ -1,4 +1,4 @@
-//go:build (!((amd64 || arm64 || riscv64) && linux) && !((amd64 || arm64) && (darwin || freebsd)) && !((amd64 || arm64) && windows)) || js
+//go:build (!((amd64 || arm64 || ppc64le || riscv64 || s390x) && linux) && !((amd64 || arm64) && (darwin || freebsd)) && !((amd64 || arm64) && windows)) || js
package sysfs