Skip to content

Commit

Permalink
syscall: stub Getrlimit on wasip1
Browse files Browse the repository at this point in the history
This is a prerequisite to enabling the pure Go resolver for
wasip1.

Change-Id: Iecd8a18ce4c9eb69a697d29930bedb7175b4f0ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/500577
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
chriso authored and pull[bot] committed Jun 30, 2023
1 parent 82d3bb7 commit 8258552
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/syscall/syscall_wasip1.go
Expand Up @@ -478,3 +478,16 @@ func SetNonblock(fd int, nonblocking bool) error {
errno := fd_fdstat_set_flags(int32(fd), flags)
return errnoErr(errno)
}

type Rlimit struct {
Cur uint64
Max uint64
}

const (
RLIMIT_NOFILE = iota
)

func Getrlimit(which int, lim *Rlimit) error {
return ENOSYS
}

0 comments on commit 8258552

Please sign in to comment.