wasip2: add stubs to get internal/syscall/unix to work

This fixes lots of broken tests in stdlib packages in Go 1.24.
This commit is contained in:
Ayke van Laethem
2025-02-24 15:49:20 +01:00
committed by Ron Evans
parent c180d6fe2f
commit 66da29e89f
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -233,6 +233,10 @@ func (w WaitStatus) Continued() bool { return false }
func (w WaitStatus) StopSignal() Signal { return 0 }
func (w WaitStatus) TrapCause() int { return 0 }
// Purely here for compatibility.
type Rusage struct {
}
// since rusage is quite a big struct and we stub it out anyway no need to define it here
func Wait4(pid int, wstatus *WaitStatus, options int, rusage uintptr) (wpid int, err error) {
return 0, ENOSYS // TODO
+3
View File
@@ -120,8 +120,11 @@ const (
SYS_FCNTL64
SYS_FSTATAT64
SYS_IOCTL
SYS_MKDIRAT
SYS_OPENAT
SYS_READLINKAT
SYS_UNLINKAT
SYS_WAITID
PATH_MAX = 4096
)