Skip to content

Commit 66da29e

Browse files
aykevldeadprogram
authored andcommitted
wasip2: add stubs to get internal/syscall/unix to work
This fixes lots of broken tests in stdlib packages in Go 1.24.
1 parent c180d6f commit 66da29e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/syscall/syscall_libc.go

+4
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ func (w WaitStatus) Continued() bool { return false }
233233
func (w WaitStatus) StopSignal() Signal { return 0 }
234234
func (w WaitStatus) TrapCause() int { return 0 }
235235

236+
// Purely here for compatibility.
237+
type Rusage struct {
238+
}
239+
236240
// since rusage is quite a big struct and we stub it out anyway no need to define it here
237241
func Wait4(pid int, wstatus *WaitStatus, options int, rusage uintptr) (wpid int, err error) {
238242
return 0, ENOSYS // TODO

src/syscall/syscall_libc_wasi.go

+3
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,11 @@ const (
120120
SYS_FCNTL64
121121
SYS_FSTATAT64
122122
SYS_IOCTL
123+
SYS_MKDIRAT
123124
SYS_OPENAT
125+
SYS_READLINKAT
124126
SYS_UNLINKAT
127+
SYS_WAITID
125128
PATH_MAX = 4096
126129
)
127130

0 commit comments

Comments
 (0)