]> Cypherpunks.ru repositories - gostls13.git/commitdiff
syscall: stub Getrlimit on wasip1
authorChris O'Hara <cohara87@gmail.com>
Sat, 3 Jun 2023 01:49:48 +0000 (11:49 +1000)
committerGopher Robot <gobot@golang.org>
Thu, 29 Jun 2023 23:05:01 +0000 (23:05 +0000)
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>

src/syscall/syscall_wasip1.go

index 5d19c000ae6176656cffca0ec8850df8e4882463..e66afee5e9ad41333f8c33591bbe4d02bdaf7df9 100644 (file)
@@ -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
+}